fix(ops/pipelines): Move to static pipeline

This step would get inserted at the wrong point in the build pipeline
otherwise, causing a dependency cycle and causing the pipeline to fail.

Change-Id: I534568eec77f74ae6c47276820f8a9e99493a3ea
This commit is contained in:
Vincent Ambo 2021-12-10 11:01:21 +03:00
parent e4231c9816
commit fc14c21bb9
2 changed files with 18 additions and 20 deletions

View file

@ -76,25 +76,5 @@ let
++ [
# Simultaneously run protobuf checks
protoCheck
# After duck, on success, create a gcroot if the build branch is
# canon.
#
# We care that this anchors *most* of the depot, in practice
# it's unimportant if there is a build race and we get +-1 of
# the targets.
#
# Unfortunately this requires a third evaluation of the graph,
# but since it happens after :duck: it should not affect the
# timing of status reporting back to Gerrit.
({
command = "nix-instantiate -A ci.gcroot --add-root /nix/var/nix/gcroots/depot/canon";
label = ":anchor:";
"if" = ''build.branch == "refs/heads/canon"'';
depends_on = [{
step = ":duck:";
allow_failure = false;
}];
})
];
in (writeText "depot.yaml" (toJSON pipeline))

View file

@ -46,6 +46,24 @@ steps:
exit 1
fi
# After duck, on success, create a gcroot if the build branch is
# canon.
#
# We care that this anchors *most* of the depot, in practice it's
# unimportant if there is a build race and we get +-1 of the
# targets.
#
# Unfortunately this requires a third evaluation of the graph, but
# since it happens after :duck: it should not affect the timing of
# status reporting back to Gerrit.
- label: ":anchor:"
if: "build.branch == 'refs/heads/canon'"
command: |
nix-instantiate -A ci.gcroot --add-root /nix/var/nix/gcroots/depot/canon
depends_on:
- step: ":duck:"
allow_failure: false
# Create a revision number for the current commit for builds on
# canon.
#