Skip to content

Commit

Permalink
Fix specifying tag on CodeBuild repository image to use (#377)
Browse files Browse the repository at this point in the history
**Why?**
As reported in issue #374, the schema validation looks for a dictionary
of tags when a `repository_arn` is set. While the rest of the code, tests, and
documentation talk about a tag string.

**What?**
This change requests updates the schema to fix this issue.
  • Loading branch information
sbkok authored Jul 22, 2021
1 parent f0cde7d commit 075be17
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/providers-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ Provider type: `codebuild`.
> pipeline to consume a custom image if required.
> Along with `repository_arn`, we also support a `tag` key which can be used
> to define which image should be used (defaults to `latest`).
> An example of this setup is provided [here](https://github.com/awslabs/aws-deployment-framework/blob/master/docs/user-guide.md#custom-build-images).
- *size* *(String)* **(small|medium|large)** - default: `small`.
> The Compute type to use for the build, types can be found
> [here](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html).
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ pipelines:
provider: codebuild
image:
repository_arn: arn:aws:ecr:region:012345678910:repository/test
tag: latest #optional (and also defaults to latest)
tag: latest # optional (defaults to latest)
targets:
- ...
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
# CodeBuild
CODEBUILD_IMAGE_PROPS = {
"repository_arn": str, # arn:aws:ecr:region:012345678910:repository/test
Optional("tags"): dict,
Optional("tag"): str, # defaults to latest
}
CODEBUILD_PROPS = {
Optional("image"): Or(str, CODEBUILD_IMAGE_PROPS),
Expand Down

0 comments on commit 075be17

Please sign in to comment.