Skip to content

Commit 4f7ea3c

Browse files
Converting templates to 1ES PT (#8892)
* Converting templates to 1ES PT * update to templates-official * updating pool to NetCore1ESPool-Internal * featureFlags autoBaseline to 'true' * Revert all changes to eng/common * Change task PublishPipelineArtifact to 1ES.PublishPipelineArtifact * clean up and re-adding few helpful comments * clean up eng/common/templates --------- Co-authored-by: Rishabh Chauhan <rchauhan@microsoft.com>
1 parent ddf7e8c commit 4f7ea3c

File tree

2 files changed

+125
-199
lines changed

2 files changed

+125
-199
lines changed

azure-pipelines.yml

Lines changed: 53 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,67 @@
11
# This is a simple wrapper for eng/pipeline.yml to get around the limitation of
22
# user-defined variables not being available in yaml template expressions.
33

4-
# Parameters ARE available in template expressions, and parameters can have default values,
5-
# so they can be used to control yaml flow.
6-
#
7-
4+
# Parameters ARE available in template expressions, and parameters can have default values
85
variables:
9-
# clean the local repo on the build agents
10-
- name: Build.Repository.Clean
6+
# clean the local repo on the build agents
7+
- name: Build.Repository.Clean
8+
value: true
9+
- name: _DotNetArtifactsCategory
10+
value: WINDOWSDESKTOP
11+
- name: _DotNetValidationArtifactsCategory
12+
value: WINDOWSDESKTOP
13+
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
14+
- name: PostBuildSign
15+
value: false
16+
- ${{ else }}:
17+
- name: PostBuildSign
1118
value: true
12-
- name: _DotNetArtifactsCategory
13-
value: WINDOWSDESKTOP
14-
- name: _DotNetValidationArtifactsCategory
15-
value: WINDOWSDESKTOP
16-
- ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), eq(variables['Build.Reason'], 'Manual')) }}:
17-
- name: PostBuildSign
18-
value: false
19-
- ${{ else }}:
20-
- name: PostBuildSign
21-
value: true
22-
23-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
24-
- group: DotNet-Wpf-SDLValidation-Params
25-
26-
27-
# This is set in the pipeline directly
28-
# When set to false, CI tests will not be enabled in builds.
29-
#
30-
# _ContinuousIntegrationTestsEnabled: false
31-
32-
# Setting batch to true, triggers one build at a time.
33-
# if there is a push while a build in progress, it will wait,
34-
# until the running build finishes, and produce a build with all the changes
35-
#
36-
# only trigger ci builds for the master and release branches
19+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
20+
- group: DotNet-Wpf-SDLValidation-Params
3721
trigger:
38-
batch: true
22+
batch: true
3923
branches:
40-
include:
24+
include:
4125
- main
4226
- release/*
4327
- internal/release/*
4428
- experimental/*
4529
paths:
4630
exclude:
4731
- Documentation/*
48-
49-
pr:
50-
autoCancel: true
51-
branches:
52-
include:
53-
- main
54-
- release/*
55-
- experimental/*
56-
- feature/win11theming/staging
57-
- feature/win11theming/release
58-
paths:
59-
exclude:
60-
- Documentation/*
61-
62-
# Call the pipeline.yml template, which does the real work
63-
stages:
64-
- stage: build
65-
displayName: Build
66-
jobs:
67-
- template: /eng/pipeline.yml
68-
parameters:
69-
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
70-
runAsPublic: false
71-
72-
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
73-
- template: eng\common\templates\post-build\post-build.yml
74-
parameters:
75-
publishingInfraVersion: 3
76-
enableSymbolValidation: false
77-
enableSigningValidation: false
78-
enableNugetValidation: false
79-
enableSourceLinkValidation: false
80-
# This is to enable SDL runs part of Post-Build Validation Stage
81-
SDLValidationParameters:
82-
enable: false
83-
params: ' -SourceToolsList @("policheck","credscan")
84-
-TsaInstanceURL $(_TsaInstanceURL)
85-
-TsaProjectName $(_TsaProjectName)
86-
-TsaNotificationEmail $(_TsaNotificationEmail)
87-
-TsaCodebaseAdmin $(_TsaCodebaseAdmin)
88-
-TsaBugAreaPath $(_TsaBugAreaPath)
89-
-TsaIterationPath $(_TsaIterationPath)
90-
-TsaRepositoryName "wpf"
91-
-TsaCodebaseName "wpf"
92-
-TsaPublish $True'
32+
resources:
33+
repositories:
34+
- repository: 1ESPipelineTemplates
35+
type: git
36+
name: 1ESPipelineTemplates/1ESPipelineTemplates
37+
ref: refs/tags/release
38+
extends:
39+
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
40+
parameters:
41+
featureFlags:
42+
autoBaseline: true
43+
pool:
44+
name: NetCore1ESPool-Internal
45+
image: 1es-windows-2022-pt
46+
os: windows
47+
customBuildTags:
48+
- ES365AIMigrationTooling
49+
stages:
50+
- stage: build
51+
displayName: Build
52+
jobs:
53+
- template: /eng/pipeline.yml@self
54+
parameters:
55+
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
56+
runAsPublic: false
57+
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
58+
- template: /eng/common/templates-official/post-build/post-build.yml@self
59+
parameters:
60+
publishingInfraVersion: 3
61+
enableSymbolValidation: false
62+
enableSigningValidation: false
63+
enableNugetValidation: false
64+
enableSourceLinkValidation: false
65+
SDLValidationParameters:
66+
enable: false
67+
params: ' -SourceToolsList @("policheck","credscan") -TsaInstanceURL $(_TsaInstanceURL) -TsaProjectName $(_TsaProjectName) -TsaNotificationEmail $(_TsaNotificationEmail) -TsaCodebaseAdmin $(_TsaCodebaseAdmin) -TsaBugAreaPath $(_TsaBugAreaPath) -TsaIterationPath $(_TsaIterationPath) -TsaRepositoryName "wpf" -TsaCodebaseName "wpf" -TsaPublish $True'

0 commit comments

Comments
 (0)