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 dd8e8c5..6bdf17f 100644 --- a/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy +++ b/buildSrc/src/main/groovy/com/widen/plugins/buildkite/BuildkitePipeline.groovy @@ -346,6 +346,20 @@ class BuildkitePipeline implements ConfigurableEnvironment { model.run = service } + /** + * Push a built service to a repository. Multiple pushes are allowed in one step. + */ + void push(String service, String image) { + model.get('push', []) << "$service:$image" + } + + /** + * Push a built service to a repository. Multiple pushes are allowed in one step. + */ + void push(String service, String image, String tag) { + push(service, "$image:$tag") + } + /** * The repository for pushing and pulling pre-built images. */