From b24eb197857fa4545a33d596ce3407a05b7f3d0f Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sun, 13 Sep 2020 10:20:58 -1000 Subject: [PATCH] add downstream dependencie and quote version The VERSION variable is still missing in downstream jobs even though the documentation states it could be added like that. Add the VERSION to the trigger job and also quote it, to avoid possible YAML parsing issues. Adding a *depend* to the triggered job makes the CI report the downstream success state instead of instantly marking the upstream job as success. Meaning, if a downstream SDK or IB job fails, the upstream job is marked as failed. Signed-off-by: Paul Spooren --- .gitlab/ci/base.yml | 3 +++ generate_targets.sh | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/base.yml b/.gitlab/ci/base.yml index 08940ba..2ce7fd0 100644 --- a/.gitlab/ci/base.yml +++ b/.gitlab/ci/base.yml @@ -26,8 +26,11 @@ generate-targets: - targets.yml trigger-deploy: + variables: + VERSION: "$VERSION" stage: deploy trigger: + strategy: depend include: - artifact: targets.yml job: generate-targets diff --git a/generate_targets.sh b/generate_targets.sh index 17fddac..8628b1d 100644 --- a/generate_targets.sh +++ b/generate_targets.sh @@ -17,8 +17,8 @@ gen_targets_sdk() { deploy-sdk_$ARCH: extends: .deploy-sdk variables: - VERSION: $VERSION - TARGETS: $TARGETS" + VERSION: \"$VERSION\" + TARGETS: \"$TARGETS\"" done } @@ -29,7 +29,7 @@ gen_targets_imagebuilder() { deploy-imagebuilder_$TARGET: extends: .deploy-imagebuilder variables: - VERSION: $VERSION" + VERSION: \"$VERSION\"" done }