Skip to content

Commit

Permalink
also trigger build if PR gets merged
Browse files Browse the repository at this point in the history
  • Loading branch information
fatteneder committed Dec 2, 2024
1 parent 5456f8e commit 5973d18
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
15 changes: 10 additions & 5 deletions pipelines/main/launch_unsigned_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ steps:
- *pr-labels
commands: |
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
### Launch Linux build jobs
# Regular:
GROUP="Build" \
Expand Down Expand Up @@ -112,7 +113,8 @@ steps:
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/doctest.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/pdf_docs/build_pdf_docs.yml
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}))
if [[ $${BUILD} == 1 ]]; then
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/analyzegc.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/embedding.yml
Expand Down Expand Up @@ -141,7 +143,8 @@ steps:
commands: |
export ALLOW_FAIL="false"
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
if [[ $${BUILD} == 1 ]]; then
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/gcext.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/test_revise.yml
Expand Down Expand Up @@ -187,7 +190,8 @@ steps:
commands: |
export ALLOW_FAIL="true"
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
# Launch Linux allowed-to-fail build jobs
GROUP="Allow Fail" \
BUILD="$${BUILD}" \
Expand Down Expand Up @@ -223,7 +227,8 @@ steps:
commands: |
export ALLOW_FAIL="true"
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
if [[ $${BUILD} == 1 ]]; then
### Launch Linux allowed-to-fail test jobs.
# Regular:
Expand Down
6 changes: 4 additions & 2 deletions pipelines/main/launch_upload_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ steps:
export BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET
export ALLOW_FAIL="false"
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
if [[ $${BUILD} == 1 ]]; then
##### Launch `upload_*` jobs to store tarballs into S3 once tests are done
### Linux:
Expand Down Expand Up @@ -106,7 +107,8 @@ steps:
# Explicitly pass along the cryptic token to child pipelines
export BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
export ALLOW_FAIL="true"
Expand Down
9 changes: 6 additions & 3 deletions pipelines/scheduled/launch_unsigned_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ steps:
- *pr-labels
commands: |
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
GROUP="Source Build" \
ALLOW_FAIL="false" \
BUILD="$${BUILD}" \
Expand All @@ -61,7 +62,8 @@ steps:
repo_url: "https://github.com/JuliaCI/julia-buildkite"
commands: |
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
if [[ $${BUILD} == 1 ]]; then
GROUP="Source Tests (Allow Fail)" \
ALLOW_FAIL="true" \
Expand All @@ -83,7 +85,8 @@ steps:
- *pr-labels
commands: |
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
GROUP="no_GPL" \
ALLOW_FAIL="false" \
BUILD="$${BUILD}" \
Expand Down
3 changes: 2 additions & 1 deletion pipelines/scheduled/launch_upload_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ steps:
# Explicitly pass along the cryptic token to child pipelines
export BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep -E "\bci-force-build\b")" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE}))
MERGED=$(test "$${BUILDKITE_PULL_REQUEST}" = "false" && echo 1 || echo 0)
BUILD=$(($${TRIGGER_BUILD} || $${FORCE} || $${MERGED}}))
if [[ $${BUILD} == 1 ]]; then
# Launch `upload_*` jobs to store tarballs into S3 once tests are done
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand Down

0 comments on commit 5973d18

Please sign in to comment.