From 6c7c55825dad4b044ab2fa7920ee367543f65531 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Tue, 5 Jul 2022 20:42:33 +0200 Subject: [PATCH] diff-manifests: save diff as artifact Manifest diffs can sometimes get large and putting them in the log makes life harder for everyone. Save them in a single file in the job artifacts instead. Update the comment left by Schutzbot on the PR to mention the artifacts. --- test/cases/diff-manifests.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/cases/diff-manifests.sh b/test/cases/diff-manifests.sh index de07c9889..759c88319 100755 --- a/test/cases/diff-manifests.sh +++ b/test/cases/diff-manifests.sh @@ -2,6 +2,9 @@ set -euo pipefail +artifacts="ci-artifacts" +mkdir -p "${artifacts}" + # Colorful output. function greenprint { echo -e "\033[1;32m[$(date -Isecond)] ${1}\033[0m" @@ -67,9 +70,11 @@ if (( err == 0 )); then fi greenprint "Manifests differ" -echo "${diff}" +echo "${diff}" > "${artifacts}/manifests.diff" +greenprint "Saved diff in job artifacts" + cat > "${review_data_file}" << EOF -{"body":"⚠️ This PR introduces changes in at least one manifest (when comparing PR HEAD ${head} with the main merge-base ${mergebase}). Please review the changes.","event":"COMMENT"} +{"body":"⚠️ This PR introduces changes in at least one manifest (when comparing PR HEAD ${head} with the main merge-base ${mergebase}). Please review the changes. The changes can be found in the job artifacts of the \`Manifest-diff\` job as \`manifests.diff\`","event":"COMMENT"} EOF greenprint "Posting review comment"