Skip to content

Commit

Permalink
Fix location of --push directive for prod images (#22142)
Browse files Browse the repository at this point in the history
Previous #22127 had `--push` added in a wrong place.
It should only be added when cache is being built and it
was added always, with resulted in authentication error as
login has not been performed before the --push.
  • Loading branch information
potiuk authored Mar 10, 2022
1 parent 8c3f479 commit 57e711e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/ci/libraries/_build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,6 @@ function build_images::build_prod_images() {
elif [[ "${DOCKER_CACHE}" == "pulled" ]]; then
docker_prod_directive=(
"--cache-from=${AIRFLOW_PROD_IMAGE}:cache"
"--push"
)
else
echo
Expand All @@ -616,6 +615,7 @@ function build_images::build_prod_images() {
# Cache for prod image contains also build stage for buildx when mode=max specified!
docker_prod_directive+=(
"--cache-to=type=registry,ref=${AIRFLOW_PROD_IMAGE}:cache,mode=max"
"--push"
)
if [[ ${PLATFORM} =~ .*,.* ]]; then
echo
Expand Down

0 comments on commit 57e711e

Please sign in to comment.