From 4ad94b9cf82177975b04f5de23ddaba35b2f6683 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 19 Dec 2021 19:24:04 +0300 Subject: feat(ops/pipelines): annotate patchset builds with Gerrit URLs If available, provide a link back to Gerrit on the overview page of a build. Uses the default style (i.e. style unset), which makes it non-intrusive visually. Change-Id: I4271d589d548015b75762fd0584f3958bfcc53e5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4442 Tested-by: BuildkiteCI Reviewed-by: grfn --- ops/pipelines/static-pipeline.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ops/pipelines/static-pipeline.yaml b/ops/pipelines/static-pipeline.yaml index 9f9a93c65814..4924569b62d8 100644 --- a/ops/pipelines/static-pipeline.yaml +++ b/ops/pipelines/static-pipeline.yaml @@ -8,6 +8,12 @@ steps: - label: ":llama:" command: | set -ue + + if test -n "$${GERRIT_CHANGE_URL-}"; then + echo "This is a build of [cl/$$GERRIT_CHANGE_ID]($$GERRIT_CHANGE_URL) (at patchset #$$GERRIT_PATCHSET)" | \ + buildkite-agent annotate + fi + nix-build -A ops.pipelines.depot -o pipeline --show-trace # Steps need to be uploaded in reverse order because pipeline -- cgit 1.4.1