forked from dotnet/install-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-official.yml
178 lines (168 loc) · 5.21 KB
/
azure-pipelines-official.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# YAML file in the main branch
schedules:
- cron: '0 0 * * 0'
displayName: Weekly midnight build
branches:
include:
- main
trigger:
- main
pr:
- main
variables:
- group: DotNet-Install-Scripts-BuildPipeline-Params
- template: eng/common-variables.yml
resources:
repositories:
- repository: 1ESPipelineTemplates
type: git
name: 1ESPipelineTemplates/1ESPipelineTemplates
ref: refs/tags/release
extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
parameters:
featureFlags:
autoBaseline: true
sdl:
sourceAnalysisPool:
name: NetCore1ESPool-Svc-Internal
image: 1es-windows-2022
os: windows
sbom:
enabled: false
codeSignValidation:
enabled: true
break: true
additionalTargetsGlobPattern: -|**\Install-Scripts.Test\**;
policheck:
enabled: true
tsa:
enabled: true
pool:
name: NetCore1ESPool-Svc-Internal
image: windows.vs2022preview.amd64
os: windows
customBuildTags:
- ES365AIMigrationTooling
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates-official/jobs/jobs.yml@self
parameters:
artifacts:
publish:
artifacts: true
logs: true
manifests: true
enableMicrobuild: true
enablePublishUsingPipelines: true
workspace:
clean: all
jobs:
- job: Windows_NT
timeoutInMinutes: 90
pool:
name: netcore1espool-internal
image: 1es-windows-2022
os: windows
strategy:
matrix:
Build_Release:
_BuildConfig: Release
preSteps:
- checkout: self
clean: true
steps:
- task: UseDotNet@2
displayName: Get .NET Core SDK
inputs:
version: 8.x
- task: DotNetCoreCLI@2
displayName: Run Tests
inputs:
command: test
- script: eng\common\cibuild.cmd
-configuration $(_BuildConfig)
-projects src/Signing/SignScripts.csproj
-prepareMachine
$(_InternalBuildArgs)
/p:Test=false
/p:DotNetSignType=$(_SignType)
/p:TeamName=$(_TeamName)
displayName: Sign scripts
env:
SIGNTOOL_DISABLE_TELEMETRY: 'true'
- task: PowerShell@2
displayName: Validate Signature
inputs:
filePath: eng/common/sdk-task.ps1
arguments: -task SigningValidation -restore -msbuildEngine vs
/p:InputFiles='$(Build.Repository.LocalPath)/artifacts/bin/SignScripts/**/*.ps1'
/p:PackageBasePath='$(Build.Repository.LocalPath)/artifacts/bin/SignScripts/'
- job: LinuxTests
timeoutInMinutes: 30
pool:
name: netcore1espool-internal
image: 1es-ubuntu-2204
os: linux
steps:
- checkout: self
displayName: Checkout Self
clean: true
- task: UseDotNet@2
displayName: Get .NET Core SDK
inputs:
version: 8.x
- script: |
chmod u+x src/dotnet-install.sh
displayName: 'Add permission to execute'
- task: DotNetCoreCLI@2
displayName: Run Tests
inputs:
command: test
- job: MacOSTests
timeoutInMinutes: 30
pool:
name: Azure Pipelines
image: macOS-13
os: macOS
steps:
- checkout: self
displayName: Checkout Self
clean: true
- task: UseDotNet@2
displayName: Get .NET Core SDK
inputs:
version: 8.x
- script: |
chmod u+x src/dotnet-install.sh
displayName: 'Add permission to execute'
- task: DotNetCoreCLI@2
displayName: Run Tests
inputs:
command: test
- template: eng\common\templates-official\post-build\post-build.yml@self
parameters:
enableSigningValidation: false
enableNugetValidation: false
enableSymbolValidation: true
enableSourceLinkValidation: true
publishingInfraVersion: 3
publishDependsOn:
- Validate
# This is to enable SDL runs part of Post-Build Validation Stage
SDLValidationParameters:
enable: true
continueOnError: false
params: ' -SourceToolsList @("policheck","credscan")
-TsaInstanceURL $(_TsaInstanceURL)
-TsaProjectName $(_TsaProjectName)
-TsaNotificationEmail $(_TsaNotificationEmail)
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
-TsaBugAreaPath $(_TsaBugAreaPath)
-TsaIterationPath $(_TsaIterationPath)
-TsaRepositoryName "Install-Scripts"
-TsaCodebaseName "Install-Scripts"
-TsaPublish $True
-PoliCheckAdditionalRunConfigParams @("UserExclusionPath < $(Build.SourcesDirectory)\eng\policheck_exclusions.xml")'