Skip to content
Snippets Groups Projects
Commit 8da76d21 authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

fix : if condition

parent 39d2cf65
No related branches found
No related tags found
1 merge request!47Draft: TEST_CI_FORK_DO_NOT_MERGE
...@@ -31,14 +31,13 @@ build:ubuntu_cpp: ...@@ -31,14 +31,13 @@ build:ubuntu_cpp:
BRANCH_TO_PULL=$CI_COMMIT_REF_NAME BRANCH_TO_PULL=$CI_COMMIT_REF_NAME
fi fi
- set +x - set +x
# - echo "Pulling from branch :" - echo "Pulling from branch: $BRANCH_TO_PULL"
# - echo "$BRANCH_TO_PULL"
# Check group namespace is valid, if it is then we are in the official project(aidge group id=6437), otherwise we pull from the fork # Check group namespace is valid, if it is then we are in the official project(aidge group id=6437), otherwise we pull from the fork
- set -x - set -x
# nominal case : we are in the official project # nominal case : we are in the official project
- > - >
if [ $(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}") -ne 404 ]; then if [ "$(curl -s -o /dev/null -w "%{http_code}" "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}")" != "404" ]; then
DEPENDENCY_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id') DEPENDENCY_ID=$(curl "https://gitlab.eclipse.org/api/v4/groups/${CI_PROJECT_NAMESPACE_ID}/projects?search=${DEPENDENCY_NAME}" | jq -r '.[0].id')
echo "curling from \"https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB\"" echo "curling from \"https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB\""
curl -f --location --output build_artifacts.zip "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/artifacts/$BRANCH_TO_PULL/download?job=$DEPENDENCY_JOB" curl -f --location --output build_artifacts.zip "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