diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 52a1e90ee62f342ce8f60935e2b10d288c6045f5..e4fb1d502aa82691b59a28fe84709f3d639b9286 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -25,9 +25,14 @@ 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") -ne 404 ]; then + # checking if given branch exist on official repo or on fork + elif [[ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CI_COMMIT_REF_NAME") -ne 404 || \ + Â $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/hrouis/$DEPENDENCY_NAME/-/tree/$CI_COMMIT_REF_NAME") -ne 404 ]] + then # Pulling from branch with same name BRANCH_TO_PULL=$CI_COMMIT_REF_NAME + else + echo "No branch \"$CI_COMMIT_REF_NAME\" found for repository \"$DEPENDENCY_NAME\"" fi - echo "Pulling from branch:\"$BRANCH_TO_PULL\""