Skip to content

Commit

Permalink
Merge pull request #18 from seek-oss/build-args
Browse files Browse the repository at this point in the history
Allow additional build args to be set with additional-build-args
  • Loading branch information
zsims authored Aug 22, 2019
2 parents 4b97f10 + 0f942d5 commit 2b837c9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ configuration:
properties:
build-args:
type: [array, string]
additional-build-args:
type: string
cache-on:
type: [array, string]
dockerfile:
Expand Down

0 comments on commit 2b837c9

Please sign in to comment.