From 0e2e5c23d340eb987aba8fc7f0d1f1b941e2bb61 Mon Sep 17 00:00:00 2001 From: Pavel Zorin Date: Tue, 30 Apr 2024 10:27:44 +0200 Subject: [PATCH] DRA: Disable summary reports for dry runs (#39240) --- .buildkite/scripts/dra.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.buildkite/scripts/dra.sh b/.buildkite/scripts/dra.sh index b20d6c6a696..e3bc62202fc 100755 --- a/.buildkite/scripts/dra.sh +++ b/.buildkite/scripts/dra.sh @@ -80,11 +80,13 @@ docker run --rm \ --artifact-set "main" \ ${DRY_RUN} | tee rm-output.txt -# extract the summary URL from a release manager output line like: -# Report summary-18.22.0.html can be found at https://artifacts-staging.elastic.co/beats/18.22.0-ABCDEFGH/summary-18.22.0.html -SUMMARY_URL=$(grep -E '^Report summary-.* can be found at ' rm-output.txt | grep -oP 'https://\S+' | awk '{print $1}') -rm rm-output.txt +if [[ "$DRY_RUN" != "--dry-run" ]]; then + # extract the summary URL from a release manager output line like: + # Report summary-18.22.0.html can be found at https://artifacts-staging.elastic.co/beats/18.22.0-ABCDEFGH/summary-18.22.0.html + SUMMARY_URL=$(grep -E '^Report summary-.* can be found at ' rm-output.txt | grep -oP 'https://\S+' | awk '{print $1}') + rm rm-output.txt -# and make it easily clickable as a Builkite annotation -printf "**Summary link:** [${SUMMARY_URL}](${SUMMARY_URL})\n" | buildkite-agent annotate --style=success + # and make it easily clickable as a Builkite annotation + printf "**Summary link:** [${SUMMARY_URL}](${SUMMARY_URL})\n" | buildkite-agent annotate --style=success +fi