From 09a2cc3dd128301f10ff21905312368f755b5ab0 Mon Sep 17 00:00:00 2001
From: Alexander Diewald <diewald@fortiss.org>
Date: Tue, 8 Dec 2020 21:40:34 +0100
Subject: [PATCH] CI: Fix the Submodule Foreach Loop if a Branch is not Present

Issue-Ref: 4093
Signed-off-by: Alexander Diewald <diewald@fortiss.org>
---
 .gitlab-ci.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0dbcfd0..58d8f8f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,7 +26,7 @@ clean:
       when: on_success
   before_script:
     - git submodule update $GIT_SUBMODULE_OPTS
-    - git submodule foreach 'git pull --no-rebase origin $BUILD_BRANCH' || true
+    - git submodule foreach 'git pull --no-rebase origin $BUILD_BRANCH || true'
   script:
     - mvn $MAVEN_CLI_OPTS $MAVEN_BUILD_OPTS clean
 
@@ -36,7 +36,7 @@ build:
     key: Default
   before_script:
     - git submodule update $GIT_SUBMODULE_OPTS
-    - git submodule foreach 'git pull --no-rebase origin $BUILD_BRANCH' || true
+    - git submodule foreach 'git pull --no-rebase origin $BUILD_BRANCH || true'
   script:
     - mvn $MAVEN_CLI_OPTS $MAVEN_BUILD_OPTS verify
   artifacts:
@@ -54,7 +54,7 @@ test:
     key: Default
   before_script:
     - git submodule update $GIT_SUBMODULE_OPTS
-    - git submodule foreach 'git pull --no-rebase origin $BUILD_BRANCH' || true
+    - git submodule foreach 'git pull --no-rebase origin $BUILD_BRANCH || true'
     - xvfb.sh # Setup of a virtual display needed for bringing up eclipse
   script:
     - mvn $MAVEN_CLI_OPTS $MAVEN_TEST_OPTS $MAVEN_BUILD_DIR integration-test
-- 
GitLab