From eb8fe265754c9cb86c2b5e71fa4371b31cc01686 Mon Sep 17 00:00:00 2001 From: James Fraser Date: Fri, 5 May 2023 09:39:33 +0100 Subject: [PATCH] Add 'key' to CommandStep --- .../com/widen/plugins/buildkite/BuildkitePipeline.groovy | 7 +++++++ .../groovy/com/widen/plugins/buildkite/idea/pipeline.gdsl | 1 + 2 files changed, 8 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 318be31..d5fabeb 100644 --- a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy +++ b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy @@ -200,6 +200,13 @@ class BuildkitePipeline implements ConfigurableEnvironment { model.timeout_in_minutes = Math.max(timeout.toMinutes(), 1) } + /** + * A unique string to identify the step. + */ + void key(String key) { + model.key = key + } + /** * Add a Buildkite plugin to this step. * diff --git a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/idea/pipeline.gdsl b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/idea/pipeline.gdsl index 54e1daf..9f41998 100644 --- a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/idea/pipeline.gdsl +++ b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/idea/pipeline.gdsl @@ -62,6 +62,7 @@ contributor([ctx, closureCtx]) { The amount of time a job created from this step is allowed to run. If the job does not finish within this limit, it will be automatically cancelled and the build will fail. ''' + method name: 'key', params: [key: String], doc: 'A unique string to identify the step.' method name: 'plugin', params: [name: String], doc: 'Add a Buildkite plugin to this step.' method name: 'plugin', params: [name: String, body: Object], doc: 'Add a Buildkite plugin to this step.' method name: 'docker', params: [body: Closure], doc: 'Add the Docker plugin to this step.'