I am trying to create a workflow using buildkite where I cross-compile binaries using EC2 instances and then load them and run them on specialized test workers running buildkite agents in my lab. I have all the pieces built and working but I’m having trouble coordinating the handoff of the binaries from the ec2 instances to the test workers.
Attempt 1 - Queue Handoff
My first attempt was to use different queues in a single pipeline but I quickly realized there is no way to have one queue wait on another. Am I correct that this is not possible?
Attempt 2 - Pipeline Trigger
My second attempt was to use triggers where the first pipeline would trigger the second:
The problem is that build #02 needs to know the correct build number to pull the artifacts from. I tried to set this build number from the EC2 build as an environment variable in the trigger but I got this error:
Interpolating “BUILDKITE_BUILD_NUMBER” is currently not supported. Please contact hello@buildkite.com if you need this added.
So I’m at an impasse now. Can you offer any guidance on how I can enable this workflow?
Details
Pipeline 1 → https://buildkite.com/uavcan/libuavcan-v1
Pipeline 2 → https://buildkite.com/uavcan/libuavcan-v1-ontarget
Steps in Pipeline 1:
steps:
- label: ':hammer: native build'
command: "./ci/native-build.sh"
artifact_paths:
- "build_ci_native/libuavcan"
- "build_ci_native/docs/**/*"
plugins:
- docker#v3.1.0:
workdir: /repo
image: "uavcan/libuavcan:latest"
agents:
queue: 'default'
- wait
- label: ':hammer: s32k build'
command: "./ci/ontarget-s32k-build.sh"
artifact_paths:
- "build_ci_ontarget_s32k/**/*.log"
- "build_ci_ontarget_s32k/**/*.elf"
- "build_ci_ontarget_s32k/**/*.hex"
- "build_ci_ontarget_s32k/**/*.bin"
- "build_ci_ontarget_s32k/**/*.jlink"
plugins:
- docker#v3.1.0:
workdir: /repo
image: "uavcan/libuavcan:latest"
agents:
queue: 'default'
- wait
- label: ':hammer: native tests'
command: "./ci/native-test.sh"
plugins:
- docker#v3.1.0:
workdir: /repo
image: "uavcan/libuavcan:latest"
agents:
queue: 'default'
- trigger: "libuavcan v1 ontarget"
label: ":mag: ontarget testing"
build:
message: "${BUILDKITE_MESSAGE}"
commit: "${BUILDKITE_COMMIT}"
branch: "${BUILDKITE_BRANCH}"
env:
LIBUAVCAN_ARTIFACTS_BUILD: "${BUILDKITE_BUILD_NUMBER}"
Steps in pipeline 2:
steps:
- label: ':mag: ontarget-s32k'
command: "./ci/ontarget-s32k-test.sh"
agents:
queue: 'ontarget-s32k'
this pipeline’s command script includes this line:
buildkite-agent artifact download "build_ci_ontarget_s32k/*.hex" .