From db50e93bf77012701c287e6c0a98f5ae9ab3be5f Mon Sep 17 00:00:00 2001
From: Tim Jaacks <tim.jaacks@seco.com>
Date: Fri, 15 Sep 2023 14:23:27 +0200
Subject: [PATCH] Hide deploy stage if DEPLOY_RELEASE_TARGET not set

---
 build-pipeline-yocto.yml.jinja2 | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/build-pipeline-yocto.yml.jinja2 b/build-pipeline-yocto.yml.jinja2
index 68279340..e78e7e93 100644
--- a/build-pipeline-yocto.yml.jinja2
+++ b/build-pipeline-yocto.yml.jinja2
@@ -144,6 +144,10 @@ deploy-{{ machine }}:
   extends: .deploy-rsync
 {% if CI_COMMIT_TAG is defined %}
   stage: Deploy SoftwareStore
+  rules:
+    - if: $DEPLOY_RELEASE_TARGET
+      when: manual
+      allow_failure: true
   variables:
     MACHINE: {{ machine }}
     DEPLOY_SOURCE: ${RELEASE_NAME}
@@ -151,6 +155,10 @@ deploy-{{ machine }}:
     DEPLOY_TARGET_LINK: ${DEPLOY_RELEASE_TARGET_LINK}/${RELEASE_NAME}
 {% else %}
   stage: Deploy SoftwareStore Internal
+  rules:
+    - if: $DEPLOY_INTERNAL_RELEASE_TARGET
+      when: manual
+      allow_failure: true
   variables:
     MACHINE: {{ machine }}
     DEPLOY_SOURCE: ${RELEASE_NAME}
-- 
GitLab