forked from dotnet/deployment-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
127 lines (114 loc) · 4.19 KB
/
azure-pipelines.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
trigger:
batch: true
branches:
include:
- main
- release/*
- internal/release/*
pr:
- main
- release/*
- internal/release/*
name: $(Date:yyyyMMdd)$(Rev:.r)
variables:
- name: TeamName
value: dotnet-core-acquisition
# Skip Running CI tests
- name: SkipTests
value: false
# Set Official Build Id
- name: OfficialBuildId
value: $(Build.BuildNumber)
- name: PostBuildSign
value: false
# Set the target blob feed for package publish during official and validation builds.
- name: _DotNetArtifactsCategory
value: .NETCore
- name: _DotNetValidationArtifactsCategory
value: .NETCoreValidation
# Produce test-signed build for PR and Public builds
- ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}:
- name: SignType
value: test
# Set up non-PR build from internal project
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- name: SignType
value: $[ coalesce(variables.OfficialSignType, 'real') ]
# Values for SDLValidationParameters
- group: core-setup-sdl-validation
stages:
- stage: Build
jobs:
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/main')) }}:
- template: /eng/common/templates/job/onelocbuild.yml
parameters:
MirrorRepo: deployment-tools
LclSource: lclFilesfromPackage
LclPackageId: 'LCL-JUNO-PROD-MAGE'
# -------- Build Windows legs --------
# Windows x64
- template: /eng/jobs/windows-build.yml
parameters:
name: Windows_x64
publishRidAgnosticPackages: true
targetArchitecture: x64
# Windows x86
- template: /eng/jobs/windows-build.yml
parameters:
name: Windows_x86
targetArchitecture: x86
# Windows arm64
- template: /eng/jobs/windows-build.yml
parameters:
name: Windows_arm64
targetArchitecture: arm64
# Source-build
- template: /eng/common/templates/job/source-build.yml
parameters:
platform:
name: 'Managed'
container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343'
skipPublishValidation: true
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- stage: PrepareForPublish
displayName: Prepare for Publish
dependsOn: Build
jobs:
# Prep artifacts: sign them and upload pipeline artifacts expected by stages-based publishing.
- template: /eng/jobs/prepare-signed-artifacts.yml
parameters:
PublishRidAgnosticPackagesFromJobName: Windows_x64
# Publish to Build Asset Registry in order to generate the ReleaseConfigs artifact.
- template: /eng/common/templates/job/publish-build-assets.yml
parameters:
publishUsingPipelines: true
dependsOn: PrepareSignedArtifacts
pool:
name: NetCore1ESPool-Internal
demands: ImageOverride -equals Build.Server.Amd64.VS2019
# Stages-based publishing entry point
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- template: /eng/common/templates/post-build/post-build.yml
parameters:
validateDependsOn:
- PrepareForPublish
publishingInfraVersion: 3
enableSymbolValidation: false
enableSigningValidation: false
enableNugetValidation: false
enableSourceLinkValidation: false
publishInstallersAndChecksums: true
# Enable SDL validation, passing through values from the 'deployment-tools-sdl-validation' group.
SDLValidationParameters:
enable: false
params: >-
-SourceToolsList @("policheck","credscan")
-TsaInstanceURL "$(TsaInstanceURL)"
-TsaProjectName "$(TsaProjectName)"
-TsaNotificationEmail "$(TsaNotificationEmail)"
-TsaCodebaseAdmin "$(TsaCodebaseAdmin)"
-TsaBugAreaPath "$(TsaBugAreaPath)"
-TsaIterationPath "$(TsaIterationPath)"
-TsaRepositoryName "$(TsaRepositoryName)"
-TsaCodebaseName "$(TsaCodebaseName)"
-TsaPublish $True