From cf562dbb570fb407cad123c16391ccc14fdfd284 Mon Sep 17 00:00:00 2001 From: Jakub Rusz Date: Tue, 26 Jul 2022 10:54:59 +0200 Subject: [PATCH] CI: drop /tmp/artifacts upload to Gitlab Contents of this folder are uploaded to S3 with shutzbot/upload_artifacts.sh Also fixing epel installation in the mentioned script. --- .gitlab-ci.yml | 2 +- schutzbot/upload_artifacts.sh | 2 +- test/cases/diff-manifests.sh | 7 ++----- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4e497f4a3..8d477cba2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -666,7 +666,7 @@ Manifest-diff: GIT_DEPTH: 500 artifacts: paths: - - "/tmp/artifacts" + - manifests.diff SCHEDULED_CLOUD_CLEANER: stage: cleanup diff --git a/schutzbot/upload_artifacts.sh b/schutzbot/upload_artifacts.sh index cb2b739ad..fe7250586 100755 --- a/schutzbot/upload_artifacts.sh +++ b/schutzbot/upload_artifacts.sh @@ -10,7 +10,7 @@ ARTIFACTS=${ARTIFACTS:-/tmp/artifacts} function greenprint { echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m" } - +source /etc/os-release # s3cmd is in epel, add if it's not present if [[ $ID == rhel || $ID == centos ]] && ! rpm -q epel-release; then curl -Ls --retry 5 --output /tmp/epel.rpm \ diff --git a/test/cases/diff-manifests.sh b/test/cases/diff-manifests.sh index 12849730f..794cd564b 100755 --- a/test/cases/diff-manifests.sh +++ b/test/cases/diff-manifests.sh @@ -2,9 +2,6 @@ set -euo pipefail -artifacts="/tmp/artifacts" -mkdir -p "${artifacts}" - # Colorful output. function greenprint { echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m" @@ -90,10 +87,10 @@ if (( err == 0 )); then fi greenprint "Manifests differ" -echo "${diff}" > "${artifacts}/manifests.diff" +echo "${diff}" > "manifests.diff" greenprint "Saved diff in job artifacts" -artifacts_url="${CI_JOB_URL}/artifacts/browse/ci-artifacts" +artifacts_url="${CI_JOB_URL}/artifacts/browse" cat > "${review_data_file}" << EOF {"body":"⚠️ This PR introduces changes in at least one manifest (when comparing PR HEAD ${head} with the ${basebranch} merge-base ${mergebase}). Please review the changes. The changes can be found in the [artifacts of the \`Manifest-diff\` job [0]](${artifacts_url}) as \`manifests.diff\`.\n\n${merge_base_fail}[0] ${artifacts_url}","event":"COMMENT"}