Skip to content

Commit

Permalink
add option to force build using a PR label
Browse files Browse the repository at this point in the history
  • Loading branch information
fatteneder committed Nov 5, 2024
1 parent dabb3c9 commit 9ccf4d5
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 16 deletions.
34 changes: 26 additions & 8 deletions pipelines/main/launch_unsigned_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ common:
# when running tests in Julia-CI/julia-buildkite,
# but for PRs against Julia/JuliaLang BUILDKITE_PULL_REQUEST_BRANCH=master
target_branch: "master"
- pr-labels_plugin: &pr-labels
sv-oss/github-pr-labels#v0.0.2:
publish-env-var: PULL_REQUEST_LABELS

steps:
- group: "Build"
Expand All @@ -40,30 +43,33 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
# Launch Linux build jobs
GROUP="Build" \
ALLOW_FAIL="false" \
BUILD="$${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD}" \
BUILD="$${BUILD}" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/main/platforms/build_linux.arches \
.buildkite/pipelines/main/platforms/build_linux.yml
# Launch macOS packaging jobs
GROUP="Build" \
ALLOW_FAIL="false" \
BUILD="$${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD}" \
BUILD="$${BUILD}" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/main/platforms/build_macos.arches \
.buildkite/pipelines/main/platforms/build_macos.yml
GROUP="Build" \
ALLOW_FAIL="false" \
BUILD="$${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD}" \
BUILD="$${BUILD}" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/main/platforms/build_freebsd.arches \
.buildkite/pipelines/main/platforms/build_freebsd.yml
GROUP="Build" \
ALLOW_FAIL="false" \
BUILD="$${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD}" \
BUILD="$${BUILD}" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/main/platforms/build_windows.arches \
.buildkite/pipelines/main/platforms/build_windows.yml
Expand All @@ -81,10 +87,13 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/doctest.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/pdf_docs/build_pdf_docs.yml
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
if [[ $${BUILD} == 1 ]]; then
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/analyzegc.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/embedding.yml
buildkite-agent pipeline upload .buildkite/pipelines/main/misc/llvmpasses.yml
Expand All @@ -107,9 +116,12 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
export ALLOW_FAIL="false"
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
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 @@ -150,9 +162,12 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
export ALLOW_FAIL="true"
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
if [[ $${BUILD} == 1 ]]; then
# Launch Linux allowed-to-fail build jobs
GROUP="Allow Fail" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand All @@ -173,9 +188,12 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
export ALLOW_FAIL="true"
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
if [[ $${BUILD} == 1 ]]; then
# Launch Linux allowed-to-fail test jobs
GROUP="Allow Fail" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand Down
14 changes: 11 additions & 3 deletions pipelines/main/launch_upload_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ common:
# when running tests in Julia-CI/julia-buildkite,
# but for PRs against Julia/JuliaLang BUILDKITE_PULL_REQUEST_BRANCH=master
target_branch: "master"
- pr-labels_plugin: &pr-labels
sv-oss/github-pr-labels#v0.0.2:
publish-env-var: PULL_REQUEST_LABELS

steps:
- group: "Upload"
Expand All @@ -25,12 +28,14 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
# Explicitly pass along the cryptic token to child pipelines
export BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET
export ALLOW_FAIL="false"
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
if [[ $${BUILD} == 1 ]]; then
# Launch `upload_*` jobs to store tarballs into S3 once tests are done
GROUP="Upload" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand Down Expand Up @@ -77,13 +82,16 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
# 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 "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
export ALLOW_FAIL="true"
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
if [[ $${BUILD} == 1 ]]; then
# Launch Linux allowed-to-fail upload jobs
GROUP="Allow Fail (Upload)" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand Down
18 changes: 15 additions & 3 deletions pipelines/scheduled/launch_unsigned_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ common:
# when running tests in Julia-CI/julia-buildkite,
# but for PRs against Julia/JuliaLang BUILDKITE_PULL_REQUEST_BRANCH=master
target_branch: "master"
- pr-labels_plugin: &pr-labels
sv-oss/github-pr-labels#v0.0.2:
publish-env-var: PULL_REQUEST_LABELS

steps:
- group: "Source Build"
Expand All @@ -37,8 +40,11 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
if [[ $${BUILD} == 1 ]]; then
GROUP="Source Build" \
ALLOW_FAIL="false" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand All @@ -56,7 +62,9 @@ steps:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
commands: |
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || ${FORCE}))
if [[ ${BUILD} == 1 ]]; then
GROUP="Source Tests (Allow Fail)" \
ALLOW_FAIL="true" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand All @@ -73,8 +81,12 @@ steps:
- JuliaCI/external-buildkite#v1:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
if [[ $${BUILD} == 1 ]]; then
GROUP="no_GPL" \
ALLOW_FAIL="false" \
bash .buildkite/utilities/arches_pipeline_upload.sh \
Expand Down
10 changes: 8 additions & 2 deletions pipelines/scheduled/launch_upload_jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ common:
# when running tests in Julia-CI/julia-buildkite,
# but for PRs against Julia/JuliaLang BUILDKITE_PULL_REQUEST_BRANCH=master
target_branch: "master"
- pr-labels_plugin: &pr-labels
sv-oss/github-pr-labels#v0.0.2:
publish-env-var: PULL_REQUEST_LABELS

steps:
- group: "Upload (no GPL)"
Expand All @@ -24,11 +27,14 @@ steps:
- JuliaCI/external-buildkite#v1:
version: "./.buildkite-external-version"
repo_url: "https://github.com/JuliaCI/julia-buildkite"
- *diff-filter-build
- *pr-labels
commands: |
# Explicitly pass along the cryptic token to child pipelines
export BUILDKITE_PLUGIN_CRYPTIC_BASE64_SIGNED_JOB_ID_SECRET
if [[ $${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} == 1 ]]; then
FORCE=$(test -n "$(echo $${PULL_REQUEST_LABELS} | grep "\\<ci-force-build\\>")" && echo 1 || echo 0)
BUILD=$(($${BUILDKITE_PLUGIN_DIFF_FILTER_TRIGGERED_BUILD} || $${FORCE}))
if [[ $${BUILD} == 1 ]]; then
# Launch `upload_*` jobs to store tarballs into S3 once tests are done
bash .buildkite/utilities/arches_pipeline_upload.sh \
.buildkite/pipelines/scheduled/platforms/upload_linux.no_gpl.arches \
Expand Down

0 comments on commit 9ccf4d5

Please sign in to comment.