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

chore :debug

parent 104ca527
No related branches found
No related tags found
1 merge request!47Draft: TEST_CI_FORK_DO_NOT_MERGE
...@@ -32,8 +32,6 @@ build:ubuntu_cpp: ...@@ -32,8 +32,6 @@ build:ubuntu_cpp:
echo "No branch \"$CI_COMMIT_REF_NAME\" found for repository \"$DEPENDENCY_NAME\"" echo "No branch \"$CI_COMMIT_REF_NAME\" found for repository \"$DEPENDENCY_NAME\""
fi fi
- echo "Pulling from branch:\"$BRANCH_TO_PULL\"" - echo "Pulling from branch:\"$BRANCH_TO_PULL\""
- set -x
# 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
# nominal case : we are in the official project # nominal case : we are in the official project
- > - >
...@@ -50,14 +48,15 @@ build:ubuntu_cpp: ...@@ -50,14 +48,15 @@ build:ubuntu_cpp:
- JOB_ID=-1 - JOB_ID=-1
# handle case where there is no branch with the same name # handle case where there is no branch with the same name
- > - >
for i in $(seq 0 $(jq length <<< "$PIPELINES")) for i in $(seq 0 $(jq length <<< "$PIPELINES")); do
do set -x
PIPELINE_ID=$(jq --argjson idx $i '.[$idx].id' <<< $PIPELINES) PIPELINE_ID=$(jq --argjson idx $i '.[$idx].id' <<< $PIPELINES)
JOBS=$(curl -s --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/pipelines/$PIPELINE_ID/jobs" | jq --arg job_name "$DEPENDENCY_JOB" 'map(select((.name == $job_name) and (.status == "success")))') JOBS=$(curl -s --header "PRIVATE_TOKEN: $CI_JOB_TOKEN" "https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/pipelines/$PIPELINE_ID/jobs" | jq --arg job_name "$DEPENDENCY_JOB" 'map(select((.name == $job_name) and (.status == "success")))')
if [[ $(jq '. | length' <<< $JOBS) > 0 ]]; then if [[ $(jq '. | length' <<< $JOBS) > 0 ]]; then
JOB_ID=$(jq '.[0].id' <<< $JOBS) JOB_ID=$(jq '.[0].id' <<< $JOBS)
break break
fi fi
set +x
done done
- > - >
if( $JOB_ID == -1 ) ; then if( $JOB_ID == -1 ) ; then
...@@ -69,7 +68,6 @@ build:ubuntu_cpp: ...@@ -69,7 +68,6 @@ build:ubuntu_cpp:
- echo "curling from \"https://gitlab.eclipse.org/api/v4/projects/$DEPENDENCY_ID/jobs/$JOB_ID/artifacts\"" - 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" - 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
- unzip -q -o build_artifacts.zip -d . - unzip -q -o build_artifacts.zip -d .
- rm -rf build_cpp - rm -rf build_cpp
# end !reference[] # end !reference[]
......
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