Skip to content

Commit

Permalink
Group output
Browse files Browse the repository at this point in the history
  • Loading branch information
72636c committed Mar 13, 2019
1 parent 087fad3 commit 15f15af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hooks/pre-command
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ if [[ -n ${BUILDKITE_PLUGIN_DOCKER_ECR_CACHE_TARGET:-} ]]; then
fi

if ! docker pull "${image}:${tag}"; then
echo "Image not cached, building"
echo '--- Building image'
docker build . --file "${docker_file}" --tag "${image}:${tag}" "${target_args[@]}" || exit 1
docker push "${image}:${tag}"
docker tag "${image}:${tag}" "${image}:latest"

echo "--- Pushing tag ${tag}"
docker push "${image}:${tag}"

echo "--- Pushing tag latest"
docker push "${image}:latest"
fi || echo "Not found"

Expand Down

0 comments on commit 15f15af

Please sign in to comment.