[ci] always supply defaults for parallelism vars (#132520)

This commit is contained in:
Spencer 2022-05-19 07:28:47 -07:00 committed by GitHub
parent a7012a319b
commit 3effa893da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 8 deletions

View file

@ -2,8 +2,8 @@
set -uo pipefail
JOB=$BUILDKITE_PARALLEL_JOB
JOB_COUNT=$BUILDKITE_PARALLEL_JOB_COUNT
JOB=${BUILDKITE_PARALLEL_JOB:-0}
JOB_COUNT=${BUILDKITE_PARALLEL_JOB_COUNT:-1}
# a jest failure will result in the script returning an exit code of 10
@ -35,4 +35,4 @@ while read -r config; do
# uses heredoc to avoid the while loop being in a sub-shell thus unable to overwrite exitCode
done <<< "$(find src x-pack packages -name jest.config.js -not -path "*/__fixtures__/*" | sort)"
exit $exitCode
exit $exitCode

View file

@ -4,10 +4,10 @@ set -euo pipefail
source .buildkite/scripts/steps/functional/common.sh
export JOB_NUM=$BUILDKITE_PARALLEL_JOB
export JOB_NUM=${BUILDKITE_PARALLEL_JOB:-0}
export JOB=ftr-configs-${JOB_NUM}
FAILED_CONFIGS_KEY="${BUILDKITE_STEP_ID}${BUILDKITE_PARALLEL_JOB:-0}"
FAILED_CONFIGS_KEY="${BUILDKITE_STEP_ID}${JOB_NUM}"
# a FTR failure will result in the script returning an exit code of 10
exitCode=0

View file

@ -8,6 +8,8 @@ is_test_execution_step
.buildkite/scripts/bootstrap.sh
JOB=${BUILDKITE_PARALLEL_JOB:-0}
echo '--- Jest'
checks-reporter-with-killswitch "Jest Unit Tests $((BUILDKITE_PARALLEL_JOB+1))" \
checks-reporter-with-killswitch "Jest Unit Tests $((JOB+1))" \
.buildkite/scripts/steps/test/jest_parallel.sh jest.config.js

View file

@ -8,6 +8,8 @@ is_test_execution_step
.buildkite/scripts/bootstrap.sh
JOB=${BUILDKITE_PARALLEL_JOB:-0}
echo '--- Jest Integration Tests'
checks-reporter-with-killswitch "Jest Integration Tests $((BUILDKITE_PARALLEL_JOB+1))" \
checks-reporter-with-killswitch "Jest Integration Tests $((JOB+1))" \
.buildkite/scripts/steps/test/jest_parallel.sh jest.integration.config.js

View file

@ -2,7 +2,7 @@
set -euo pipefail
export JOB=$BUILDKITE_PARALLEL_JOB
export JOB=${BUILDKITE_PARALLEL_JOB:-0}
# a jest failure will result in the script returning an exit code of 10
exitCode=0