From f93b38c1a8c9195635334e038fbd3757e0c4e6c1 Mon Sep 17 00:00:00 2001 From: Jakub Rusz Date: Thu, 21 Jul 2022 09:35:56 +0200 Subject: [PATCH] CI: fix ci_details artifact placement The output of the ci_details.sh needs to be placed in the /tmp/artifacts in order to be uploaded with the rest of the artifacts. --- .gitlab-ci.yml | 5 +++-- schutzbot/upload_artifacts.sh | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 61cf84361..9c5b9481f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,10 +8,11 @@ stages: .base: before_script: - - schutzbot/ci_details.sh > ci-details-before-run.txt + - mkdir -p /tmp/artifacts + - schutzbot/ci_details.sh > /tmp/artifacts/ci-details-before-run.txt - cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null after_script: - - schutzbot/ci_details.sh > ci-details-after-run.txt || true + - schutzbot/ci_details.sh > /tmp/artifacts/ci-details-after-run.txt || true - schutzbot/update_github_status.sh update || true - schutzbot/save_journal.sh || true - schutzbot/upload_artifacts.sh diff --git a/schutzbot/upload_artifacts.sh b/schutzbot/upload_artifacts.sh index 8d9d43d17..cb2b739ad 100755 --- a/schutzbot/upload_artifacts.sh +++ b/schutzbot/upload_artifacts.sh @@ -11,6 +11,13 @@ function greenprint { echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m" } +# 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 \ + https://dl.fedoraproject.org/pub/epel/epel-release-latest-"${VERSION_ID%.*}".noarch.rpm + sudo rpm -Uvh /tmp/epel.rpm +fi + sudo dnf -y install s3cmd greenprint "Job artifacts will be uploaded to: $S3_URL"