about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
authorJean-François Roche <jfroche@affinitic.be>2022-07-22T10·28+0200
committerJean-François Roche <jfroche@affinitic.be>2022-07-25T09·29+0000
commitb9d79109ddadc83e7062e52d0944c8b73f00a98e (patch)
treecdbc48cc2730ee6a41cfd4aa6477edbc089ea67d /nix
parentc7d966c57b6543d0e37cf34de87091c504d8275b (diff)
feat(ops/buildkite): Allow skip of individual steps r/4320
Using the `skip` attribute, it lets the user decide to temporarily skip a step.

Change-Id: If63ce60a2b4148f041655912730acc4ae9e28534
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5971
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'nix')
-rw-r--r--nix/buildkite/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nix/buildkite/default.nix b/nix/buildkite/default.nix
index a3e9da956d..ac349f2bd5 100644
--- a/nix/buildkite/default.nix
+++ b/nix/buildkite/default.nix
@@ -323,6 +323,7 @@ rec {
 
       # TODO(tazjin): Turn into hard-failure after 2022-10-01.
     , postBuild ? null
+    , skip ? false
     }:
     let
       parent = overridableParent parentOverride;
@@ -346,7 +347,8 @@ rec {
         label
         needsOutput
         parent
-        parentLabel;
+        parentLabel
+        skip;
 
       # //nix/buildkite is growing a new feature for adding different
       # "build phases" which supersedes the previous `postBuild`
@@ -386,7 +388,7 @@ rec {
     let
       step = {
         label = ":gear: ${cfg.label} (from ${cfg.parentLabel})";
-        skip = if cfg.alwaysRun then false else cfg.parent.skip or false;
+        skip = if cfg.alwaysRun then false else cfg.skip or cfg.parent.skip or false;
 
         depends_on = lib.optional
           (buildEnabled && !cfg.alwaysRun && !cfg.needsOutput)