From 0b4709051aad2d9d236cd985c65643a3ed6882bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20KUBLER?= <gregoire.kubler@proton.me> Date: Thu, 21 Mar 2024 09:38:19 +0100 Subject: [PATCH] fix : added token to curl --- .gitlab/ci/build.gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index ea0e9c06..ed7a2d56 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -42,8 +42,8 @@ build:ubuntu_cpp: set -x echo "Retrieving build_artifacts from hrouis' forked project." USER_ID=17216 - echo "curl 'https://gitlab.eclipse.org/api/v4/users/${USER_ID}/projects?search=${DEPENDENCY_NAME}'" - DEPENDENCY_ID=$(curl 'https://gitlab.eclipse.org/api/v4/users/${USER_ID}/projects?search=${DEPENDENCY_NAME}') + 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') # 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') -- GitLab