Skip to content

Commit 2e7d709

Browse files
committed
ci: rework buildkite pipeline template for machine awareness
* Moved from wait to depends_on between steps (command & trigger): Added 'key' to command step that trigger 'depends_on' and removed the wait step. This also allows for handling of the per "MACHINE" builds in a better way so we don't need to wait for one to finish for the other to start. * Renamed artifacts to have "MACHINE" (aarch64 or x86_64) in filename to handle creating SDK packages for each host machine type. * Added a label to the command step for nicety in the web UI NOTE: $MACHINE in this file is going to be replaced by sed, so we need to make sure we use $MACHINE always when we want it replaced (for example ${MACHINE} will not match). Signed-off-by: Kumar Gala <[email protected]>
1 parent c92271b commit 2e7d709

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.buildkite/pipeline-template.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
steps:
2-
- command:
2+
- label: "$MACHINE"
3+
key: "$MACHINE"
4+
command:
35
- >
46
case "$${BUILDKITE_PARALLEL_JOB}" in
57
0) TARGET="arm";;
@@ -24,21 +26,21 @@ steps:
2426
if [ $${TARGET} = "tools" ]; then
2527
buildkite-agent artifact upload zephyr-sdk-$MACHINE-hosttools-standalone-0.9.sh;
2628
elif [ $${TARGET} = "cmake" ]; then
27-
buildkite-agent artifact upload cmake.tar.bz2;
29+
buildkite-agent artifact upload cmake.$MACHINE.tar.bz2;
2830
else
2931
cd build/output
3032
case "$${TARGET}" in
3133
xtensa_*)
32-
tar --exclude='build.log.bz2' -jcvf ../../$${TARGET}.tar.bz2 xtensa/$${TARGET#xtensa_}/*-zephyr-*;
34+
tar --exclude='build.log.bz2' -jcvf ../../$${TARGET}.$MACHINE.tar.bz2 xtensa/$${TARGET#xtensa_}/*-zephyr-*;
3335
buildkite-agent artifact upload xtensa/$${TARGET#xtensa_}/*-zephyr-*/build.log.bz2
3436
;;
3537
*)
36-
tar --exclude='build.log.bz2' -jcvf ../../$${TARGET}.tar.bz2 *-zephyr-*;
38+
tar --exclude='build.log.bz2' -jcvf ../../$${TARGET}.$MACHINE.tar.bz2 *-zephyr-*;
3739
buildkite-agent artifact upload *-zephyr-*/build.log.bz2
3840
;;
3941
esac
4042
cd ../..
41-
buildkite-agent artifact upload $${TARGET}.tar.bz2;
43+
buildkite-agent artifact upload $${TARGET}.$MACHINE.tar.bz2;
4244
fi
4345
parallelism: 16
4446
env:
@@ -54,9 +56,8 @@ steps:
5456
agents:
5557
- "queue=sdk-ng-$MACHINE"
5658

57-
- wait
58-
5959
- trigger: "sdk-ng-deploy"
60+
depends_on: "$MACHINE"
6061
if: build.tag != null || build.pull_request.id != null
6162
build:
6263
message: "${BUILDKITE_MESSAGE}"
@@ -67,3 +68,4 @@ steps:
6768
BUILDKITE_PULL_REQUEST_BASE_BRANCH: "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}"
6869
BUILDKITE_PULL_REQUEST_REPO: "${BUILDKITE_PULL_REQUEST_REPO}"
6970
BUILDKITE_TAG: "${BUILDKITE_TAG}"
71+
MACHINE: "$MACHINE"

0 commit comments

Comments
 (0)