diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index b412d6e22cfd676c6380332ee3b0e1b1f9d5c6d2..f8fee83112a69957499c419a3da7764d65a0ad32 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -13,7 +13,6 @@ build:ubuntu_cpp: - DEPENDENCY_JOB="build:ubuntu_cpp" # - !reference [.download_dependency, script] - apt-get install -y jq - - set -x - BRANCH_TO_PULL="dev" # default branch # Check if a branch with the same name exist on the dependance repository - > @@ -27,14 +26,14 @@ build:ubuntu_cpp: 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 - echo "Pull from default" else # Pulling from branch with same name - echo "Pull from branch name" BRANCH_TO_PULL=${CI_COMMIT_REF_NAME} fi + echo "Pull 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 DEPENDENCY_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id') @@ -50,8 +49,8 @@ build:ubuntu_cpp: echo "curling from \"https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/$JOB_ID/artifacts\"" curl --location "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/$JOB_ID/artifacts" --output build_artifacts.zip fi + set +x - - set +x - unzip -q -o build_artifacts.zip -d . - rm -rf build_cpp # end !reference[]