From 8da76d2193056a8eeb44f8c3369bd6c11e187a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20KUBLER?= <gregoire.kubler@proton.me> Date: Wed, 20 Mar 2024 17:10:56 +0100 Subject: [PATCH] fix : if condition --- .gitlab/ci/build.gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 95444fdc..831ed2da 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -31,14 +31,13 @@ build:ubuntu_cpp: BRANCH_TO_PULL=$CI_COMMIT_REF_NAME fi - set +x - # - echo "Pulling from branch :" - # - echo "$BRANCH_TO_PULL" + - echo "Pulling from branch: $BRANCH_TO_PULL" # 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 - set -x # nominal case : we are in the official project - > - if [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}") -ne 404 ]; then + if [ "$(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}")" != "404" ]; then DEPENDENCY_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id') echo "curling from \"https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB\"" curl -f --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB" -- GitLab