Skip to content

Commit ef41802

Browse files
Courtesy Push Pipeline Improvement - Part#2 | Merge Publish and Courtesy Push Jobs (#21467)
* Merge Publish Steps * Update Conditions * Remove Copy pkg * Update#1 Review comments * Optimize multiple output scanning * Baseline pnpm fastlist executables for Guardian BinSkim BA2008 * Add fastlist file hash to the baseline * AB#2329703 Added Work-Item * Udpate#1 Review Comments
1 parent 368a683 commit ef41802

File tree

5 files changed

+65
-76
lines changed

5 files changed

+65
-76
lines changed

.azure-pipelines/.vsts.release.yml

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ parameters:
3636
displayName: skipPublish (Not for production use)
3737
type: boolean
3838
default: false
39-
- name: publishToDistributedTaskTest
40-
displayName: Publish to test feed (DistributedTasks-test), for infrastucture testing
41-
type: boolean
42-
default: false
4339
- name: dryRun
4440
displayName: Dry Run (no push, no PR, no feed publish)
4541
type: boolean
@@ -144,63 +140,44 @@ extends:
144140
os: Windows_NT
145141
useSemverBuildConfig: ${{ parameters.useSemverBuildConfig }}
146142

147-
# Publish
148-
- job: publish
149-
displayName: Publish Nuget Artifacts
150-
timeoutInMinutes: 360
151-
dependsOn:
152-
- build_all_windows
153-
condition: and(succeeded(), ne(variables['build.reason'], 'PullRequest'), eq(variables['tasksSkipPublish'], 'false'))
154-
pool:
155-
name: 1ES-ABTT-Shared-Pool
156-
image: abtt-windows-2022
157-
os: windows
158-
templateContext:
159-
outputs:
160-
- output: buildArtifacts
161-
displayName: 'Publish per task NuGet package artifact'
162-
PathtoPublish: _package/nuget-packages
163-
ArtifactName: IndividualNuGetPackages
164-
steps:
165-
- template: /ci/publish-steps.yml@self
166-
167143
# Courtesy Push
168144
- job: courtesy_push
169145
displayName: Courtesy Push
170-
timeoutInMinutes: 180
146+
timeoutInMinutes: 540
171147
pool:
172148
name: 1ES-ABTT-Shared-Pool
173149
image: abtt-windows-2022
174150
os: windows
175151
dependsOn:
176-
- publish
152+
- build_all_windows
177153
condition: |
178154
and(
179155
succeeded(),
180156
eq(variables['COURTESY_PUSH'], 'true'),
181-
or(
182-
eq(variables['build.reason'], 'Schedule'),
183-
and(
184-
eq(variables['build.reason'], 'Manual'),
185-
eq(variables['FORCE_COURTESY_PUSH'], 'true')
186-
)
187-
)
157+
eq(variables['build.reason'], 'Manual'),
158+
eq(variables['FORCE_COURTESY_PUSH'], 'true')
188159
)
189160
templateContext:
161+
outputParentDirectory: $(Build.SourcesDirectory)/_package
190162
outputs:
163+
- output: buildArtifacts
164+
displayName: 'Publish per task NuGet package artifact'
165+
PathtoPublish: $(Build.SourcesDirectory)/_package/nuget-packages
166+
ArtifactName: IndividualNuGetPackages
167+
condition: succeeded()
191168
- output: nuget
192-
packagesToPush: '$(Build.SourcesDirectory)/IndividualNugetPackagesDownloaded/IndividualNugetPackages/*/*.nupkg'
169+
packagesToPush: '$(Build.SourcesDirectory)/_package/nuget-packages/*/*.nupkg'
193170
packageParentPath: '$(Build.SourcesDirectory)'
194-
${{ if or(eq(parameters.dryRun, true),eq(parameters.publishToDistributedTaskTest, true)) }}:
171+
condition: and(succeeded(), eq(variables['tasksSkipPublish'], 'false'))
172+
${{ if eq(parameters.dryRun, true) }}:
195173
publishVstsFeed: 'c86767d8-af79-4303-a7e6-21da0ba435e2/9d34d871-8032-4e10-a34a-c7a01e125865'
196174
${{ else }}:
197175
publishVstsFeed: 'c86767d8-af79-4303-a7e6-21da0ba435e2/e10d0795-57cd-4d7f-904e-5f39703cb096'
198176
nuGetFeedType: internal
199177
displayName: Push Nuget package
200178
allowPackageConflicts: $(COURTESY_PUSH)
201179
steps:
202-
- checkout: self
203-
- template: /ci/courtesy-push.yml@self
180+
- template: /ci/courtesy-push-steps.yml@self
204181

205182
# GitHub Release
206183
- job: github_release
@@ -218,7 +195,8 @@ extends:
218195
condition: |
219196
and(
220197
succeeded(),
221-
in(variables['build.reason'], 'Schedule', 'Manual')
198+
eq(variables['build.reason'], 'Manual'),
199+
eq(variables['tasksSkipPublish'], 'false')
222200
)
223201
templateContext:
224202
outputs: []

.gdn/.gdnbaselines

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,28 @@
23082308
],
23092309
"justification": "Unit tests data",
23102310
"createdDate": "2024-06-05 17:14:35Z"
2311+
},
2312+
"c5ba7d2f0fe15f40bc259ccd65fe5cab41cdd12a05d1c5fc87a1cfecaef239bb": {
2313+
"signature": "c5ba7d2f0fe15f40bc259ccd65fe5cab41cdd12a05d1c5fc87a1cfecaef239bb",
2314+
"alternativeSignatures": [
2315+
"c74f8a2003f1e4d2f51cf6f4a06f20c9479c6a8dd46fadbe33799a38b7e7dab3"
2316+
],
2317+
"memberOf": [
2318+
"default"
2319+
],
2320+
"justification": "BinSkim BA2008: Third-party pnpm fastlist executables (fastlist-0.3.0-x86.exe) lacks Control Flow Guard - not under our control",
2321+
"createdDate": "2025-11-24 00:00:00Z"
2322+
},
2323+
"f51b66848d5cc1ac54c0b6250853060ea4cf93461f113f4cdd0ab4bade214c89": {
2324+
"signature": "f51b66848d5cc1ac54c0b6250853060ea4cf93461f113f4cdd0ab4bade214c89",
2325+
"alternativeSignatures": [
2326+
"8ba7397e8a319de274c5245a25fbc405a6da27c7dfa5eac46dd47d7141216260"
2327+
],
2328+
"memberOf": [
2329+
"default"
2330+
],
2331+
"justification": "BinSkim BA2008: Third-party pnpm fastlist executables (fastlist-0.3.0-x64.exe) lacks Control Flow Guard - not under our control",
2332+
"createdDate": "2025-11-24 00:00:00Z"
23112333
}
23122334
}
23132335
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,29 @@ steps:
5252
- powershell: |
5353
Write-Host "##vso[build.updatebuildnumber]$(aggregate_version)"
5454
displayName: Update build number
55+
56+
- powershell: |
57+
cd $(Build.SourcesDirectory)/ci/courtesy-push
58+
npm ci
59+
displayName: npm ci (courtesy-push)
60+
61+
- powershell: $(Build.SourcesDirectory)/ci/set-sprint-variables.ps1
62+
displayName: Set currentSprint variables
63+
64+
- powershell: |
65+
$currentDate = Get-Date -Format "yyyyMMdd-HHmm"
66+
Write-Host "##vso[task.setVariable variable=currentDate]$currentDate"
67+
displayName: Set currentDate variable
68+
69+
- template: /ci/generate-branch-name.yml@self
70+
- template: /ci/get-AzDo-pat.yml@self
71+
72+
- script: node $(Build.SourcesDirectory)/ci/courtesy-push/courtesy-push.js $(Build.SourcesDirectory)/_package/nuget-packages/unified_deps.xml
73+
name: createCourtesyPushPR
74+
displayName: Update unified deps and create branch
75+
env:
76+
TOKEN: $(AzDo_PAT)
77+
BRANCH_NAME: $(branchName)
78+
DRYRUN: $(isDryRun)
79+
USERNAME: $(username)
80+

ci/courtesy-push.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

ci/stage-milestone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var util = require('./ci-util');
44

55
// Parse command line arguments (positional)
66
// Usage: node stage-milestone.js <tasksBuildArtifact>
7-
var tasksBuildArtifact = process.argv[2] || 'package';
7+
var tasksBuildArtifact = process.argv[2] || 'allTasks';
88

99
// initialize _package
1010
util.initializePackagePath();

0 commit comments

Comments
 (0)