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 <grfn@gws.fyi>
This commit is contained in:
Vincent Ambo 2021-12-19 19:24:04 +03:00 committed by tazjin
parent 736ef8ce41
commit 4ad94b9cf8

View file

@ -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