I have a Cloud Build configuration with the following steps:
- Build a Docker image.
- Run some test on that image.
- Push the image to Container Registry.
- Do some more stuff.
The problem is that the build failed at the push step (number 3).
Is there any way to download the created docker image or to change the command (args) for step 3 so that push won't fail and so I can retry the build from the step 3?
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [
'build',
'--build-arg', 'base_image=${_DOCKER_BASE_IMAGE}',
'--build-arg', 'cuda=${_CUDA}',
'--build-arg', 'python_version=${_PYTHON_VERSION}',
'--build-arg', 'cloud_build=true',
'--build-arg', 'release_version=${_RELEASE_VERSION}',
'-t', 'gcr.io/aluminiumponey/xla:${_IMAGE_NAME}',
'-f', 'docker/Dockerfile', '.'
]
timeout: 14400s
- name: 'gcr.io/cloud-builders/docker'
entrypoint: bash
args: ['-c', 'docker tag gcr.io/aluminiumponey/xla:${_IMAGE_NAME} gcr.io/repsmate/xla:${_IMAGE_NAME}_$(date -u +%Y%m%d)']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/aluminiumponey/xla']
timeout: 1800s
- name: 'gcr.io/aluminiumponey/xla:${_IMAGE_NAME}'
entrypoint: 'bash'
args: ['-c', 'source /pytorch/xla/docker/common.sh && collect_wheels ${_RELEASE_VERSION}']
The push failed because I didn't had permissions to push to gcr.io.