From cb5643905e373ad46ebea6978210e2bb1d0a2921 Mon Sep 17 00:00:00 2001 From: Gustavo Yokoyama Ribeiro Date: Mon, 8 Aug 2022 20:31:49 -0300 Subject: [PATCH] Do not fail when there is no cloud image to be released to TEST --- gocd/sp.target.gocd.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gocd/sp.target.gocd.yaml b/gocd/sp.target.gocd.yaml index f9ebe16b..d75540d4 100644 --- a/gocd/sp.target.gocd.yaml +++ b/gocd/sp.target.gocd.yaml @@ -45,7 +45,10 @@ pipelines: osc -A https://api.suse.de release --target-project=SUSE:SLE-15-SP5:GA:TEST --target-repository=containers -r containerfile SUSE:SLE-15-SP5:GA $container done osc -A https://api.suse.de release --target-project=SUSE:SLE-15-SP5:GA:TEST --target-repository=containers -r images SUSE:SLE-15-SP5:GA sles15-image - PRODUCTS=$(osc -A https://api.suse.de ls SUSE:SLE-15-SP5:GA | grep "^SLES15-SP5" | grep -v release) + PRODUCTS=$(osc -A https://api.suse.de ls SUSE:SLE-15-SP5:GA | grep "^SLES15-SP5" | grep -v release ||:) + if [ -z "${PRODUCTS}" ]; then + echo "[WARNNING] There is no cloud image to be released" + fi for product in kiwi-templates-Minimal 000product $PRODUCTS; do osc -A https://api.suse.de release SUSE:SLE-15-SP5:GA $product done