ci: Improve the flakes reports on IRC.
authorEric Anholt <eric@anholt.net>
Tue, 5 May 2020 17:44:46 +0000 (10:44 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 6 May 2020 18:34:38 +0000 (18:34 +0000)
We were incorrectly taking the merge-request on non-MR pipelines (the
master build after merge) due to a missing '$'.  And, for those pipelines,
it would be nice to note whether they're for master or a stable branch.

Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4896>

.gitlab-ci/bare-metal/fastboot.sh
.gitlab-ci/deqp-runner.sh

index 8b0577ce0827d671d1c77a15206113e0d796451b..801cb9a14079ec7950d79ce61c3c7bde12843d58 100755 (executable)
@@ -55,6 +55,8 @@ cp $BM/init.sh rootfs/init
 touch rootfs/set-job-env-vars.sh
 chmod +x rootfs/set-job-env-vars.sh
 for var in \
+    CI_COMMIT_BRANCH \
+    CI_COMMIT_TITLE \
     CI_JOB_URL \
     CI_MERGE_REQUEST_SOURCE_BRANCH_NAME \
     CI_MERGE_REQUEST_TITLE \
index 48d95b2bedd03f1a76aaae1b462f98aa6de4973e..d2e0b592304e62f42322c46727b55b0cc768cfaf 100755 (executable)
@@ -111,8 +111,10 @@ report_flakes() {
     echo "JOIN $channel"
     sleep 1
     desc="Flakes detected in job: $CI_JOB_URL on $CI_RUNNER_DESCRIPTION"
-    if [ -n "CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" ]; then
+    if [ -n "$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME" ]; then
         desc="$desc on branch $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME ($CI_MERGE_REQUEST_TITLE)"
+    elif [ -n "$CI_COMMIT_BRANCH" ]; then
+        desc="$desc on branch $CI_COMMIT_BRANCH ($CI_COMMIT_TITLE)"
     fi
     echo "PRIVMSG $channel :$desc"
     for flake in `cat $flakes`; do