Skip to content
Snippets Groups Projects
Commit 42f80d38 authored by Cyril Moineau's avatar Cyril Moineau
Browse files

Robustify script to use hardcoded ID if unknown group is used.

parent ceade396
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,14 @@
BRANCH_TO_PULL=${CI_COMMIT_REF_NAME}
fi
- apt-get install -y jq
- DEPENDENCY_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id')
# Check group namespace is valid, if not DEPENDENCY_ID=6437 (aidge group ID)
- >
if [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}") -eq 404 ]; then
DEPENDENCY_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id')
else
echo "Using aidge group id by default"
DEPENDENCY_ID=6437
fi
- 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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment