Last active
May 22, 2018 02:50
-
-
Save lox/35760841401d79021926b6b87a25f443 to your computer and use it in GitHub Desktop.
Test passing artifacts between triggered builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
buildkite-agent artifact download test.txt . | |
cat test.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- trigger: "trigger-artifact-test-2" | |
label: ":rocket: Trigger trigger-test-2" | |
build: | |
meta_data: | |
triggering-job-id: "${BUILDKITE_JOB_ID}" | |
- wait | |
- label: "Get artifacts from triggered build" | |
command: bash ./get-artifacts-from-triggered-build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- label: ":llama:" | |
command: bash ./upload-artifacts.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hello world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euxo pipefail | |
triggered_job_id="$(buildkite-agent meta-data get triggering-job-id)" | |
echo "triggered by $triggered_job_id" | |
buildkite-agent artifact upload --job "$triggered_job_id" test.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment