diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index ed7a2d56d29c368dbf68e6b5b8bb92ea908538b0..aee502278e17a5cb7e4befe051c9cca51ae18dbe 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -42,9 +42,9 @@ build:ubuntu_cpp: set -x echo "Retrieving build_artifacts from hrouis' forked project." USER_ID=17216 + echo "command : curl'https://gitlab.eclipse.org/api/v4/users/${USER_ID}/projects?search=${DEPENDENCY_NAME}'" - DEPENDENCY_ID=$(curl --header "PRIVATE_TOKEN: oxDmKtZEEAx3St_8z-Pn" "https://gitlab.eclipse.org/api/v4/users/${USER_ID}/projects?search=${DEPENDENCY_NAME}") - DEPENDENCY_ID=$(cat $DEPENDENCY_ID | jq -r '.[0].id') + DEPENDENCY_ID=$(curl --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" "https://gitlab.eclipse.org/api/v4/users/${USER_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id') # retrieve latest pipeline of given branch, independant from its success or failure PIPELINE_ID=$(curl 'https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/pipelines?ref=${BRANCH_TO_PULL}&order_by=updated_at&sort=desc' | jq -r '.[0].id') JOB_ID=$(curl "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/pipelines/$PIPELINE_ID/jobs" | jq 'map(select(.name == ${DEPENDENCY_JOB})) | .[0].id')