diff options
author | Vincent Ambo <mail@tazj.in> | 2022-01-22T13·11+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-01-24T14·57+0000 |
commit | 9e28029705eedbf160274476fcdf7b6fc45b3db8 (patch) | |
tree | cc5b0fab0ade8cf425f68844401677d112eaf9ab /nix/buildkite | |
parent | 4d7dcf10ed9ccf18d87c87b0fb1b1018c8bf8a17 (diff) |
feat(nix/buildkite): Support un-gated post-build extra steps r/3668
Allows users to define steps with `postBuild = true` which always run after :duck:, but do not require human approvals. This can be useful for things like unconditional release steps. Change-Id: Idbf6c48a9dedcfc6cc9b7f098423364e2fa72d2d Reviewed-on: https://cl.tvl.fyi/c/depot/+/5052 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Autosubmit: tazjin <tazjin@tvl.su>
Diffstat (limited to 'nix/buildkite')
-rw-r--r-- | nix/buildkite/default.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nix/buildkite/default.nix b/nix/buildkite/default.nix index 6bf7feb8b09b..f8d69b23991c 100644 --- a/nix/buildkite/default.nix +++ b/nix/buildkite/default.nix @@ -159,7 +159,7 @@ in rec { splitExtraSteps = partition ({ postStep, ... }: postStep) (attrValues (mapAttrs (name: value: { inherit name value; - postStep = value ? prompt; + postStep = (value ? prompt) || (value.postBuild or false); }) (target.meta.ci.extraSteps or {}))); mkExtraStep' = { name, value, ... }: mkExtraStep step name value; @@ -238,6 +238,10 @@ in rec { # confirmation. These steps always run after the main build is # done and have no influence on CI status. # + # postBuild (optional): If set to true, this step will run after + # all primary build steps (that is, after status has been reported + # back to CI). + # # needsOutput (optional): If set to true, the parent derivation # will be built in the working directory before running the # command. Output will be available as 'result'. @@ -280,7 +284,8 @@ in rec { prompt ? false, needsOutput ? false, branches ? null, - alwaysRun ? false + alwaysRun ? false, + postBuild ? false }@cfg: let parentLabel = parent.env.READTREE_TARGET; |