From 830850ed1790a568628296251217357a3ec605be Mon Sep 17 00:00:00 2001 From: Zachary Sims Date: Wed, 21 Aug 2019 10:10:30 +1000 Subject: [PATCH 1/2] Allow additional build args to be set with additional-build-args --- README.md | 13 +++++++++++++ hooks/pre-command | 1 + 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index f3e3e2d..21cde5b 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,19 @@ steps: - docker#v3.0.1 ``` +Additional `docker build` arguments be passed via the `additional-build-args` setting: + +```yaml +steps: + - command: 'echo amaze' + env: + ARG_1: wow + plugins: + - seek-oss/docker-ecr-cache#v1.3.0: + additional-build-args: '--ssh= default=\$SSH_AUTH_SOCK' + - docker#v3.0.1 +``` + ### Specifying an ECR repository name The plugin pushes and pulls Docker images to and from an ECR repository named diff --git a/hooks/pre-command b/hooks/pre-command index ef7cfcb..fe24f84 100755 --- a/hooks/pre-command +++ b/hooks/pre-command @@ -134,6 +134,7 @@ if ! docker pull "${image}:${tag}"; then docker build \ --file "${docker_file}" \ --tag "${image}:${tag}" \ + ${BUILDKITE_PLUGIN_DOCKER_ECR_CACHE_ADDITIONAL_BUILD_ARGS:-} \ ${build_args[@]+"${build_args[@]}"} \ ${target_args[@]+"${target_args[@]}"} \ "${context}" || exit 1 From 0f942d545bf96be83ba8874ec5af1879f4ca2263 Mon Sep 17 00:00:00 2001 From: Zac Sims Date: Wed, 21 Aug 2019 11:01:37 +1000 Subject: [PATCH 2/2] Update plugin.yml --- plugin.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin.yml b/plugin.yml index fd7440e..759a6fa 100644 --- a/plugin.yml +++ b/plugin.yml @@ -7,6 +7,8 @@ configuration: properties: build-args: type: [array, string] + additional-build-args: + type: string cache-on: type: [array, string] dockerfile: