diff --git a/Jenkinsfile b/Jenkinsfile index ea2cb9be..ef5c6835 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -200,8 +200,8 @@ pipeline { sh '''#!/bin/bash set -exo pipefail - gcloud container images add-tag gcr.io/kaggle-images/python:${PRETEST_TAG} gcr.io/kaggle-images/python:${STAGING_TAG} - gcloud container images add-tag gcr.io/kaggle-private-byod/python:${PRETEST_TAG} gcr.io/kaggle-private-byod/python:${STAGING_TAG} + gcloud artifacts docker tags add gcr.io/kaggle-images/python:${PRETEST_TAG} gcr.io/kaggle-images/python:${STAGING_TAG} + gcloud artifacts docker tags add gcr.io/kaggle-private-byod/python:${PRETEST_TAG} gcr.io/kaggle-private-byod/python:${STAGING_TAG} # NOTE(b/336842777): TPUVM images are tested on an actual TPU VM outside this pipeline, so they are not auto-promoted to :staging tag. ''' } diff --git a/packages/build_package b/packages/build_package index e0af53e2..9064ba57 100755 --- a/packages/build_package +++ b/packages/build_package @@ -11,8 +11,8 @@ Options: -v, --version VERSION Package version to build. -b, --base-image IMAGE Base image tag (e.g. m80). -c, --use-cache Use layer cache when building a new image. - -f, --force-rebuild Rebuild the image regardless of whether it already exist on GCR. - -u, --push Push image to GCR. + -f, --force-rebuild Rebuild the image regardless of whether it already exist on GAR. + -u, --push Push image to GAR. --build-arg ARG=VALUE Build arguments to pass to the docker build command. EOF } @@ -23,7 +23,7 @@ BASE_IMAGE='' DOCKERFILE='' CACHE_FLAG='--no-cache' FORCE_REBUILD=false -PUSH_TO_GCR=false +PUSH_TO_GAR=false BUILD_ARGS='' while :; do @@ -138,8 +138,8 @@ if $SHOULD_BUILD; then --build-arg PACKAGE_VERSION=$PACKAGE_VERSION \ $SRCDIR - if $PUSH_TO_GCR; then - echo "Pushing $TAG to GCR..." + if $PUSH_TO_GAR; then + echo "Pushing $TAG to GAR..." docker push $TAG fi else diff --git a/push b/push index 124a3469..7ff651a5 100755 --- a/push +++ b/push @@ -64,4 +64,4 @@ readonly LABEL set -x docker tag "${SOURCE_IMAGE_TAG}" "${TARGET_IMAGE}:${LABEL}" -gcloud docker -- push "${TARGET_IMAGE}:${LABEL}" +docker push "${TARGET_IMAGE}:${LABEL}"