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.
This commit is contained in:
parent
f176326b71
commit
6c7c55825d
1 changed files with 7 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue