From ee1516734b94693b8065e1e54c00745bb5b0f850 Mon Sep 17 00:00:00 2001
From: Tim Jaacks <tim.jaacks@garz-fricke.com>
Date: Tue, 31 May 2022 18:00:40 +0200
Subject: [PATCH] Add possibility to skip MR pipeline build via label

---
 ci-test-manifest-integration.yml | 3 +++
 manifest-integration.yml         | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/ci-test-manifest-integration.yml b/ci-test-manifest-integration.yml
index baf283d..b49a45f 100644
--- a/ci-test-manifest-integration.yml
+++ b/ci-test-manifest-integration.yml
@@ -124,6 +124,9 @@ merge:
 build:
   stage: build
   rules:
+    # Do not run build if the "skip build" label is set on the merge request
+    - if: $CI_MERGE_REQUEST_LABELS =~ /skip build/
+      when: never
     # execute this in MR only and not for integrate/gitlab-ci/ integrations
     # branches. These are build after the integration has been done in all
     # projects
diff --git a/manifest-integration.yml b/manifest-integration.yml
index 357e6bc..eb2fc5b 100644
--- a/manifest-integration.yml
+++ b/manifest-integration.yml
@@ -110,6 +110,9 @@ merge:
 build:
   stage: build
   rules:
+    # Do not run build if the "skip build" label is set on the merge request
+    - if: $CI_MERGE_REQUEST_LABELS =~ /skip build/
+      when: never
     # execute this in MR only and not for integrate/gitlab-ci/ integrations
     # branches. These are build after the integration has been done in all
     # projects
-- 
GitLab