Skip to content

Commit

Permalink
Pass tasks to "build all tasks for deployment" job (#19306)
Browse files Browse the repository at this point in the history
* - Pass tasks which was built in courtesy to the next job

* - Changed passed variable

* - Uncommited cpurtesz push and publish jobs
  • Loading branch information
DmitriiBobreshev authored Nov 20, 2023
1 parent 3d2f87b commit b7f22b0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ jobs:
displayName: Build all tasks for deployments (Windows)
dependsOn:
- courtesy_push
- build_all_windows
condition: succeeded()
timeoutInMinutes: 180
variables:
task_pattern: $[dependencies.build_all_windows.outputs['getTaskPattern.task_pattern']]
pool:
name: 1ES-Shared-Hosted-Pool_Windows-Server-2022
steps:
Expand Down
7 changes: 4 additions & 3 deletions ci/build-all-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ steps:
# Filter out unchanged tasks
- script: node ./ci/filter-tasks.js
displayName: Filter out unchanged tasks
name: getTaskPattern
env:
PACKAGE_ENDPOINT: $(Package.Endpoint)
PACKAGE_TOKEN: $(Package.Token)
Expand Down Expand Up @@ -89,7 +90,7 @@ steps:
displayName: Clean tasks

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

Expand All @@ -103,7 +104,7 @@ steps:
)
# Check diff for task sources
- script: node ./ci/verify-source-changes.js "$(task_pattern)"
- script: node ./ci/verify-source-changes.js "$(getTaskPattern.task_pattern)"
displayName: Verify task source changes
condition: |
and(
Expand Down Expand Up @@ -159,7 +160,7 @@ steps:
- script: node make.js test
displayName: Run tests
condition: and(succeeded(), ne(variables['numTasks'], 0))
- script: node make.js testLegacy --task "$(task_pattern)"
- script: node make.js testLegacy --task "$(getTaskPattern.task_pattern)"
displayName: Legacy tests with node 6
condition: and(succeeded(), ne(variables['numTasks'], 0))

Expand Down
2 changes: 1 addition & 1 deletion ci/build-all-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
displayName: Clean tasks

# Build tasks
- script: node make.js serverBuild
- script: node make.js serverBuild --task "$(task_pattern)"
displayName: Build tasks

# Stage tasks individually into the package directory
Expand Down
2 changes: 1 addition & 1 deletion ci/filter-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ async function getTasksToBuildForPR (prId, forDowngradingCheck) {
var setTaskVariables = function(tasks, tasksForDowngradingCheck) {
console.log('tasks: ' + JSON.stringify(tasks));
console.log('tasksForDowngradingCheck: ' + JSON.stringify(tasksForDowngradingCheck));
console.log('##vso[task.setVariable variable=task_pattern]@(' + tasks.join('|') + ')');
console.log('##vso[task.setVariable variable=task_pattern;isOutput=true;]@(' + tasks.join('|') + ')');
console.log('##vso[task.setVariable variable=task_pattern_fordowngradingcheck]@(' + tasksForDowngradingCheck.join('|') + ')');
console.log('##vso[task.setVariable variable=numTasks]' + tasks.length);
}
Expand Down

0 comments on commit b7f22b0

Please sign in to comment.