From 1d86dba3be0d2da67cc8fc68c1828d355b0f9cdc Mon Sep 17 00:00:00 2001 From: Laurie Green Date: Tue, 24 Sep 2024 21:55:33 +0100 Subject: [PATCH] Add 'depends_on' to CommandStep (#7) We have a requirement for certain steps to be dependent on each other, without relying on static waits. --- .../com/widen/plugins/buildkite/BuildkitePipeline.groovy | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy index d5fabeb..7027297 100644 --- a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy +++ b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy @@ -207,6 +207,13 @@ class BuildkitePipeline implements ConfigurableEnvironment { model.key = key } + /** + * Make this step depend on the completion of another step + */ + void dependsOn(String dependsOn) { + model.depends_on = dependsOn + } + /** * Add a Buildkite plugin to this step. *