diff --git a/.gitlab/ci/shared_script.gitlab-ci.yml b/.gitlab/ci/shared_script.gitlab-ci.yml index ca2aea2a281c23174c8283e5e1889e980c3ef1f7..7f7d825e87541e0adc6d425163679600b13e1686 100644 --- a/.gitlab/ci/shared_script.gitlab-ci.yml +++ b/.gitlab/ci/shared_script.gitlab-ci.yml @@ -23,7 +23,11 @@ echo "Pull from branch name" BRANCH_TO_PULL=${CI_COMMIT_REF_NAME} fi - - echo "curling from https://gitlab.eclipse.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB" - - curl -f --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/$CI_PROJECT_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB" + - apt-get install jq + - DEPENDENCY_ID=$(curl --header "https://gitlab.example.com/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id') + - echo "Project ID for ${DEPENDENCY_NAME} is ${DEPENDENCY_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" - unzip -o build_artifacts.zip -d . - rm -rf build_cpp