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"