diff --git a/.gitlab/ci/build.gitlab-ci.yml b/.gitlab/ci/build.gitlab-ci.yml index 7fb30f4f25c63eee721a9252bab082d70974ffaa..ef0b353f42b56be89a875a64259b194205ade020 100644 --- a/.gitlab/ci/build.gitlab-ci.yml +++ b/.gitlab/ci/build.gitlab-ci.yml @@ -50,12 +50,12 @@ build:ubuntu_cpp: - echo "${CI_PROJECT_URL}" - echo "${CI_PROJECT_NAMESPACE}" - echo "${CI_PROJECT_NAMESPACE_ID}" + - PROJECT_INFO=$(curl -s --header "PRIVATE-TOKEN:${CI_JOB_TOKEN}" "${API_URL}/projects/${DEPENDENCY_NAME}") - > if [[ ! $PULL_FROM_FORK ]]; then # nominal case : we are in the official project DEPENDENCY_ID=$(curl "${API_URL}/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id') else # case for fork echo "Retrieving build_artifacts from user' forked project." - USER=$(curl --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" "${API_URL}/users" |Â jq .) USER_ID=$(curl --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" "${API_URL}/users" | jq -r '.[0].id') DEPENDENCY_ID=$(curl --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" "${API_URL}/users/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id') fi