From 7c3008410924ccbbca8783caa509cc6cf3c165e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20KUBLER?= <gregoire.kubler@proton.me> Date: Thu, 21 Mar 2024 10:01:39 +0100 Subject: [PATCH] fix : test token --- .gitlab/ci/build.gitlab-ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index dd7c21f4..153f0f07 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -45,9 +45,10 @@ build:ubuntu_cpp: echo "command : curl'https://gitlab.eclipse.org/api/v4/users/${USER_ID}/projects?search=${DEPENDENCY_NAME}'" 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 --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" '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 --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/pipelines/$PIPELINE_ID/jobs" | jq 'map(select(.name == ${DEPENDENCY_JOB})) | .[0].id') + + # Retrieve latest pipeline of given branch, independant from its success or failure + PIPELINE_ID=$(curl --header "PRIVATE_TOKEN: oxDmKtZEEAx3St_8z-Pn" '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 --header "PRIVATE_TOKEN: oxDmKtZEEAx3St_8z-Pn" "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/pipelines/$PIPELINE_ID/jobs" | jq 'map(select(.name == ${DEPENDENCY_JOB})) | .[0].id') echo "curling from \"https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/$JOB_ID/artifacts\"" curl --location --output build_artifacts.zip --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/$JOB_ID/artifacts" set +x -- GitLab