Skip to content

Commit

Permalink
formatfix for build all tasks when forceCourtesyPush == true
Browse files Browse the repository at this point in the history
  • Loading branch information
merlynomsft committed Oct 26, 2024
1 parent ef07bdb commit 8695de1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ variables:
value: 'true'
${{ else }}:
value: 'false'
- name: DEPLOY_ALL_TASKSVAR
${{ if eq(parameters.deploy_all_tasks, true) }}:
value: 'true'
${{ else }}:
value: 'false'

extends:
template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates
Expand Down
5 changes: 4 additions & 1 deletion ci/filter-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ var setTaskVariables = function(tasks, tasksForDowngradingCheck) {
var buildReason = process.env['BUILD_REASON'].toLowerCase();
var forceCourtesyPush = process.env['FORCE_COURTESY_PUSH'] && process.env['FORCE_COURTESY_PUSH'].toLowerCase() === 'true';
var taskNameIsSet = process.env['TASKNAMEISSET'] && process.env['TASKNAMEISSET'].toLowerCase() === 'true';
var deployAllTasks = process.env['DEPLOY_ALL_TASKSVAR'] && process.env['DEPLOY_ALL_TASKSVAR'].toLowerCase() === 'true';

if (taskNameIsSet) {
var taskName = process.env['TASKNAME'];
Expand All @@ -240,7 +241,9 @@ const ciBuildReasonList = [AzpBuildReason.Individualci, AzpBuildReason.Batchedci

async function filterTasks () {
try {
if (ciBuildReasonList.includes(buildReason) || (forceCourtesyPush && !taskNameIsSet)) {
if (deployAllTasks) {
setTaskVariables(makeOptions.tasks, makeOptions.tasks);
} else if (ciBuildReasonList.includes(buildReason) || (forceCourtesyPush && !taskNameIsSet)) {
// If CI, we will compare any tasks that have updated versions.
const tasks = await getTasksToBuildForCI();
setTaskVariables(tasks, tasks);
Expand Down

0 comments on commit 8695de1

Please sign in to comment.