fix(ops/pipelines): Fix tagging of commit revisions

It seems that shell variables don't work as expected inside the
Buildkite pipeline, so usage of variables has been removed.

We also don't echo the revision anymore because of that, but it does
still appear in the log of `git push`.

Change-Id: I124e3b09af896da898f2a78715ed371651a1c5f8
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3780
Tested-by: BuildkiteCI
Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
Vincent Ambo 2021-11-05 15:31:21 +01:00 committed by tazjin
parent 674603f6c8
commit 099f36e5ee

View file

@ -28,9 +28,5 @@ steps:
- label: ":git:"
if: "build.branch == 'refs/heads/canon'"
command: |
readonly REVISION=$(git rev-list --count --first-parent HEAD)
git -c 'credential.helper=/etc/secrets/buildkite-credential-helper' \
push origin "HEAD:refs/r/${REVISION}"
echo "Marked commit as r/${REVISION}"
push origin "HEAD:refs/r/$(git rev-list --count --first-parent HEAD)"