From b9d79109ddadc83e7062e52d0944c8b73f00a98e Mon Sep 17 00:00:00 2001 From: Jean-François Roche Date: Fri, 22 Jul 2022 12:28:56 +0200 Subject: feat(ops/buildkite): Allow skip of individual steps 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 --- nix/buildkite/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nix') diff --git a/nix/buildkite/default.nix b/nix/buildkite/default.nix index a3e9da956da3..ac349f2bd549 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) -- cgit 1.4.1