Skip to content

Commit de30a7e

Browse files
authored
[ci] Improve triggers and support test signing (#12)
Updates the CI trigger to run against `main`, `release/*`, and any tags that are created for releases. The PR trigger has also been updated to run against main. Support for "Test" signing has been added, and should help us save some time when running PR builds or CI builds against non-release branches.
1 parent 074b282 commit de30a7e

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

build-tools/automation/azure-pipelines.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
trigger:
2-
- main
3-
- release/*
4-
- dev/*
2+
branches:
3+
include:
4+
- main
5+
- release/*
6+
tags:
7+
include:
8+
- '*'
59

610
pr:
7-
- none
11+
- main
812

913
resources:
1014
repositories:
@@ -23,7 +27,18 @@ resources:
2327
name: 1ESPipelineTemplates/1ESPipelineTemplates
2428
ref: refs/tags/release
2529

30+
parameters:
31+
- name: SignArtifactsOverride
32+
default: false
33+
- name: Skip1ESComplianceTasks
34+
default: false
35+
2636
variables:
37+
- name: MicroBuildSignType
38+
${{ if or(startsWith(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['Build.SourceBranch'], 'refs/heads/main'), eq(parameters.SignArtifactsOverride, 'true')) }}:
39+
value: Real
40+
${{ else }}:
41+
value: Test
2742
- name: TeamName
2843
value: XamarinAndroid
2944
- name: BUILD_DIR
@@ -32,10 +47,8 @@ variables:
3247
value: 1ESPT-Windows2022
3348
- name: LinuxPoolImage1ESPT
3449
value: 1ESPT-Ubuntu22.04
35-
36-
parameters:
37-
- name: Skip1ESComplianceTasks
38-
default: false
50+
- name: MicroBuildPoolName
51+
value: VSEngSS-MicroBuild2022-1ES
3952

4053
extends:
4154
${{ if or(eq(variables['Build.Reason'], 'PullRequest'), eq('${{ parameters.Skip1ESComplianceTasks }}', 'true')) }}:
@@ -183,9 +196,6 @@ extends:
183196
- stage: package
184197
displayName: Package Stage
185198
dependsOn: build
186-
variables:
187-
- name: MicroBuildSignType
188-
value: Real
189199
jobs:
190200
- job: pack_sign
191201
displayName: Sign and Zip
@@ -257,9 +267,9 @@ extends:
257267
- job: sign_verify
258268
displayName: Verify Signing
259269
dependsOn: pack_sign
270+
condition: and(eq(dependencies.pack_sign.result, 'Succeeded'), eq(variables['MicroBuildSignType'], 'Real'))
260271
timeoutInMinutes: 240
261-
pool:
262-
name: VSEngSS-MicroBuild2022-1ES
272+
pool: $(MicroBuildPoolName)
263273
steps:
264274
- checkout: self
265275
submodules: recursive
@@ -274,4 +284,3 @@ extends:
274284
inputs:
275285
TargetFolders: $(Build.SourcesDirectory)\artifacts
276286
ExcludeSNVerify: true
277-
condition: and(succeededOrFailed(), eq(variables['MicroBuildSignType'], 'Real'))

0 commit comments

Comments
 (0)