From fd47b66a5bc3961d8bd0b3f56e6ff13e1a849e63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20KUBLER?= <gregoire.kubler@proton.me> Date: Wed, 20 Mar 2024 16:50:13 +0100 Subject: [PATCH] fix : bash ? --- .gitlab/ci/build.gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index e24f2d3f..1cc94051 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -15,6 +15,8 @@ build:ubuntu_cpp: - apt-get -qq install -y jq # Check if a branch with the same name exist on the dependance repository - > + set -x + BRANCH_TO_PULL="dev" # default branch if [ "$CI_MERGE_REQUEST_ID" ]; then echo "Merge request pipeline detected" if [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME") -eq 404 ]; then @@ -24,13 +26,12 @@ build:ubuntu_cpp: echo "Pull from ${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}" BRANCH_TO_PULL=${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} fi - elif [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CI_COMMIT_REF_NAME") -eq 404 ]; then - BRANCH_TO_PULL="dev" # default branch - else + elif [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CI_COMMIT_REF_NAME") -ne 404 ]; then # Pulling from branch with same name BRANCH_TO_PULL=${CI_COMMIT_REF_NAME} fi echo "Pull from branch : ${BRANCH_TO_PULL}" + set +x # Check group namespace is valid, if it is then we are in the official project(aidge group id=6437), otherwise we pull from the fork - > -- GitLab