Skip to content

Commit b7f22b0

Browse files
Pass tasks to "build all tasks for deployment" job (#19306)
* - Pass tasks which was built in courtesy to the next job * - Changed passed variable * - Uncommited cpurtesz push and publish jobs
1 parent 3d2f87b commit b7f22b0

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

azure-pipelines.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,11 @@ jobs:
101101
displayName: Build all tasks for deployments (Windows)
102102
dependsOn:
103103
- courtesy_push
104+
- build_all_windows
104105
condition: succeeded()
105106
timeoutInMinutes: 180
107+
variables:
108+
task_pattern: $[dependencies.build_all_windows.outputs['getTaskPattern.task_pattern']]
106109
pool:
107110
name: 1ES-Shared-Hosted-Pool_Windows-Server-2022
108111
steps:

ci/build-all-steps.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ steps:
5151
# Filter out unchanged tasks
5252
- script: node ./ci/filter-tasks.js
5353
displayName: Filter out unchanged tasks
54+
name: getTaskPattern
5455
env:
5556
PACKAGE_ENDPOINT: $(Package.Endpoint)
5657
PACKAGE_TOKEN: $(Package.Token)
@@ -89,7 +90,7 @@ steps:
8990
displayName: Clean tasks
9091

9192
# Build Tasks
92-
- script: node make.js serverBuild --task "$(task_pattern)"
93+
- script: node make.js serverBuild --task "$(getTaskPattern.task_pattern)"
9394
displayName: Build Tasks
9495
condition: and(succeeded(), ne(variables['numTasks'], 0))
9596

@@ -103,7 +104,7 @@ steps:
103104
)
104105
105106
# Check diff for task sources
106-
- script: node ./ci/verify-source-changes.js "$(task_pattern)"
107+
- script: node ./ci/verify-source-changes.js "$(getTaskPattern.task_pattern)"
107108
displayName: Verify task source changes
108109
condition: |
109110
and(
@@ -159,7 +160,7 @@ steps:
159160
- script: node make.js test
160161
displayName: Run tests
161162
condition: and(succeeded(), ne(variables['numTasks'], 0))
162-
- script: node make.js testLegacy --task "$(task_pattern)"
163+
- script: node make.js testLegacy --task "$(getTaskPattern.task_pattern)"
163164
displayName: Legacy tests with node 6
164165
condition: and(succeeded(), ne(variables['numTasks'], 0))
165166

ci/build-all-tasks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ steps:
2121
displayName: Clean tasks
2222

2323
# Build tasks
24-
- script: node make.js serverBuild
24+
- script: node make.js serverBuild --task "$(task_pattern)"
2525
displayName: Build tasks
2626

2727
# Stage tasks individually into the package directory

ci/filter-tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ async function getTasksToBuildForPR (prId, forDowngradingCheck) {
213213
var setTaskVariables = function(tasks, tasksForDowngradingCheck) {
214214
console.log('tasks: ' + JSON.stringify(tasks));
215215
console.log('tasksForDowngradingCheck: ' + JSON.stringify(tasksForDowngradingCheck));
216-
console.log('##vso[task.setVariable variable=task_pattern]@(' + tasks.join('|') + ')');
216+
console.log('##vso[task.setVariable variable=task_pattern;isOutput=true;]@(' + tasks.join('|') + ')');
217217
console.log('##vso[task.setVariable variable=task_pattern_fordowngradingcheck]@(' + tasksForDowngradingCheck.join('|') + ')');
218218
console.log('##vso[task.setVariable variable=numTasks]' + tasks.length);
219219
}

0 commit comments

Comments
 (0)