diff --git a/.gitlab/ci/shared_test.gitlab-ci.yml b/.gitlab/ci/shared_test.gitlab-ci.yml index 9c1e23d93cb3fd08640ae31da0ebadb7221cb40b..1f79f44759088b1b4ce12eb9ea7ec8193cca5517 100644 --- a/.gitlab/ci/shared_test.gitlab-ci.yml +++ b/.gitlab/ci/shared_test.gitlab-ci.yml @@ -9,17 +9,20 @@ shared_job: script: - GROUP_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups?search=aidge" | grep -m1 -oP '"id":\s*\K\d+') - PROJECT_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/$GROUP_ID/projects?search=$DEPENDENCY_NAME" | grep -m1 -oP '"id":\s*\K\d+') - - echo "https://gitlab.eclipse.org/api/v4/projects/$PROJECT_ID/jobs/artifacts/main/download?job=$JOB" + + + + - echo "https://gitlab.eclipse.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/main/download?job=$JOB" - echo "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CURRENT_BRANCH" # Check if a branch with the same name exist on the dependance repository - RESPONSE_CODE=$(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/eclipse/aidge/$DEPENDENCY_NAME/-/tree/$CURRENT_BRANCH") - > if [ "$RESPONSE_CODE" -eq 404 ] || [ "$CI_MERGE_REQUEST_ID" ]; then echo "default to main branch" - curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/$PROJECT_ID/jobs/artifacts/main/download?job=build:ubuntu_cpp" + curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/main/download?job=build:ubuntu_cpp" else echo "pull from ${CURRENT_BRANCH}" - curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/$PROJECT_ID/jobs/artifacts/$CURRENT_BRANCH/download?job=$JOB" + curl --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/$CURRENT_BRANCH/download?job=$JOB" fi # variables: # MY_CUSTOM_FUNCTION: >