diff --git a/.gitlab/ci/download/download.gitlab-ci.yml b/.gitlab/ci/download/download.gitlab-ci.yml index a457b25fdcfd0997fbe43e6740a4fdde5c8372be..e3ba3b93114bea081c826f73b50685308ec64241 100644 --- a/.gitlab/ci/download/download.gitlab-ci.yml +++ b/.gitlab/ci/download/download.gitlab-ci.yml @@ -41,23 +41,23 @@ include: curl --location --output build_artifacts.zip "${API_URL}/projects/$DEP_ID/jobs/$JOB_ID/artifacts" echo "Artifacts retrieved. Extracting archive." - UNZIP_OUT=$((unzip -o build_artifacts.zip -d . || true) 2> >(sed -r 's/^/2/g') 1> >(sed -r 's/^/1/g')) - - ### FILTERED STDOUT - echo "$UNZIP_OUT" \ - | sed '/^2/d;s/^1//g' \ - | grep -E "creating.+aidge[A-Za-z_]+\/$" - - UNZIP_STDERR=$(echo "$UNZIP_OUT" | sed '/^1/d;s/^2//g') ### stderr - echo $UNZIP_STDERR - if [[ "$UNZIP_STDERR" == *"End-of-central-directory signature not found."* ]]; then - echo "Failed to extract archive of Artifacts of the job." - echo "The main reason is that job's artifacts were deleted:" - echo "Either automatically because it was outdated either manually by the maintainer." - echo "To regenerate the artifacts restart a pipeline on given branch." - echo "JOB WITHOUT ARTIFACTS: $(jq -r --argjson idx $i '.[$idx]' <<< '$DEPS_SELECTED_JOBS')" - exit 1 - fi + UNZIP_OUT=$((unzip -o build_artifacts.zip -d . || true) 2> >(sed -r 's/^/2/g') 1> >(sed -r 's/^/1/g')) + + ### FILTERED STDOUT + echo "$UNZIP_OUT" \ + | sed '/^2/d;s/^1//g' \ + | grep -E "creating.+aidge[A-Za-z_]+\/$" + + UNZIP_STDERR=$(echo "$UNZIP_OUT" | sed '/^1/d;s/^2//g') ### stderr + echo $UNZIP_STDERR + if [[ "$UNZIP_STDERR" == *"End-of-central-directory signature not found."* ]]; then + echo "Failed to extract archive of Artifacts of the job." + echo "The main reason is that job's artifacts were deleted:" + echo "Either automatically because it was outdated either manually by the maintainer." + echo "To regenerate the artifacts restart a pipeline on given branch." + echo "JOB WITHOUT ARTIFACTS: $(jq -r --argjson idx $i '.[$idx]' <<< '$DEPS_SELECTED_JOBS')" + exit 1 + fi done - !reference [.ubuntu:download:print_warning , script] - set +x