Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ else
image_build_args=(
"build"
"--file=${docker_file}"
"--progress=plain"
"--tag=${image}:${tag}"
)
if [[ -n "${target:-}" ]]; then
Expand Down
8 changes: 4 additions & 4 deletions tests/ecr-registry-provider.bats
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pre_command_hook="$PWD/hooks/pre-command"
stub docker \
"login --username AWS --password-stdin 1234567891012.dkr.ecr.ap-southeast-2.amazonaws.com : echo logging in to docker" \
"pull 1234567891012.dkr.ecr.ap-southeast-2.amazonaws.com/build-cache/example-org/example-pipeline:deadbee : echo not found && false" \
"build --file=Dockerfile --tag=1234567891012.dkr.ecr.ap-southeast-2.amazonaws.com/build-cache/example-org/example-pipeline:deadbee . : echo building docker image" \
"build --file=Dockerfile --progress=plain --tag=1234567891012.dkr.ecr.ap-southeast-2.amazonaws.com/build-cache/example-org/example-pipeline:deadbee . : echo building docker image" \
"tag ${repository_uri}:deadbee ${repository_uri}:latest : echo tagged latest" \
"push ${repository_uri}:deadbee : echo pushed deadbee" \
"push ${repository_uri}:latest : echo pushed latest"
Expand Down Expand Up @@ -113,7 +113,7 @@ pre_command_hook="$PWD/hooks/pre-command"
stub docker \
"login --username AWS --password-stdin 1234567891012.dkr.ecr.eu-west-1.amazonaws.com : echo logging in to docker" \
"pull 1234567891012.dkr.ecr.eu-west-1.amazonaws.com/build-cache/example-org/example-pipeline:deadbee : echo not found && false" \
"build --file=Dockerfile --tag=1234567891012.dkr.ecr.eu-west-1.amazonaws.com/build-cache/example-org/example-pipeline:deadbee . : echo building docker image" \
"build --file=Dockerfile --progress=plain --tag=1234567891012.dkr.ecr.eu-west-1.amazonaws.com/build-cache/example-org/example-pipeline:deadbee . : echo building docker image" \
"tag ${repository_uri}:deadbee ${repository_uri}:latest : echo tagged latest" \
"push ${repository_uri}:deadbee : echo pushed deadbee" \
"push ${repository_uri}:latest : echo pushed latest"
Expand Down Expand Up @@ -161,7 +161,7 @@ pre_command_hook="$PWD/hooks/pre-command"
stub docker \
"login --username AWS --password-stdin 1234567891012.dkr.ecr.ap-southeast-1.amazonaws.com : echo logging in to docker" \
"pull 1234567891012.dkr.ecr.ap-southeast-1.amazonaws.com/build-cache/example-org/example-pipeline:deadbee : echo not found && false" \
"build --file=Dockerfile --tag=1234567891012.dkr.ecr.ap-southeast-1.amazonaws.com/build-cache/example-org/example-pipeline:deadbee . : echo building docker image" \
"build --file=Dockerfile --progress=plain --tag=1234567891012.dkr.ecr.ap-southeast-1.amazonaws.com/build-cache/example-org/example-pipeline:deadbee . : echo building docker image" \
"tag ${repository_uri}:deadbee ${repository_uri}:latest : echo tagged latest" \
"push ${repository_uri}:deadbee : echo pushed deadbee" \
"push ${repository_uri}:latest : echo pushed latest"
Expand Down Expand Up @@ -226,4 +226,4 @@ pre_command_hook="$PWD/hooks/pre-command"
unstub aws
unstub docker
unstub sha1sum
}
}
6 changes: 3 additions & 3 deletions tests/pre-command.bats
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pre_command_hook="$PWD/hooks/pre-command"

stub docker \
"pull pretend.host/path/segment/image:stubbed-computed-tag : false" \
"build --file=Dockerfile --tag=pretend.host/path/segment/image:stubbed-computed-tag . : exit 242"
"build --file=Dockerfile --progress=plain --tag=pretend.host/path/segment/image:stubbed-computed-tag . : exit 242"

run "${pre_command_hook}"

Expand All @@ -53,7 +53,7 @@ pre_command_hook="$PWD/hooks/pre-command"

stub docker \
"pull pretend.host/path/segment/image:stubbed-computed-tag : false" \
"build --file=Dockerfile --tag=pretend.host/path/segment/image:stubbed-computed-tag . : echo building docker image" \
"build --file=Dockerfile --progress=plain --tag=pretend.host/path/segment/image:stubbed-computed-tag . : echo building docker image" \
"tag ${repository_uri}:stubbed-computed-tag ${repository_uri}:latest : echo tagged latest" \
"push ${repository_uri}:stubbed-computed-tag : echo pushed stubbed-computed-tag" \
"push ${repository_uri}:latest : echo pushed latest"
Expand All @@ -80,7 +80,7 @@ pre_command_hook="$PWD/hooks/pre-command"

stub docker \
"pull pretend.host/path/segment/image:stubbed-computed-tag : false" \
"build --file=$one_time_mktemp/Dockerfile --tag=pretend.host/path/segment/image:stubbed-computed-tag . : echo building docker image" \
"build --file=$one_time_mktemp/Dockerfile --progress=plain --tag=pretend.host/path/segment/image:stubbed-computed-tag . : echo building docker image" \
"tag ${repository_uri}:stubbed-computed-tag ${repository_uri}:latest : echo tagged latest" \
"push ${repository_uri}:stubbed-computed-tag : echo pushed stubbed-computed-tag" \
"push ${repository_uri}:latest : echo pushed latest"
Expand Down
Loading