Skip to content

Commit

Permalink
ci(gcb): make 2 kaniko attempts (#13639)
Browse files Browse the repository at this point in the history
  • Loading branch information
coryan authored Feb 21, 2024
1 parent 1f0b4a3 commit ce52933
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions ci/cloudbuild/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,47 @@ availableSecrets:
logsBucket: 'gs://${_LOGS_BUCKET}/logs/google-cloud-cpp/${_TRIGGER_SOURCE}/${COMMIT_SHA}/${_DISTRO}-${_BUILD_NAME}-${_SHARD}'

steps:
# Builds the docker image that will be used by the main build step.
# Builds the docker image that will be used by the main build step. Makes 3
# attempts to workaround #6438.
- name: 'gcr.io/kaniko-project/executor:v1.20.1'
id: 'kaniko-attempt-1'
args: [
'--log-format=text',
'--context=dir:///workspace/ci',
'--dockerfile=ci/cloudbuild/dockerfiles/${_DISTRO}.Dockerfile',
'--cache=true',
'--destination=gcr.io/${PROJECT_ID}/${_IMAGE}:${BUILD_ID}',
'--push-retry=3',
'--image-fs-extract-retry=3',
'--image-download-retry=3'
]
'--image-download-retry=3',
'--push-retry=3'
]
allowFailure: true

# Pull the docker image. The step running 'ci/cloud/build.sh' would do this
# automatically, and also fill the log with about 2-3 pages of noise.
- name: 'gcr.io/${PROJECT_ID}/${_IMAGE}:${BUILD_ID}'
id: 'download-runner-image-attempt-1'
entrypoint: '/bin/true'

- name: 'gcr.io/kaniko-project/executor:v1.20.1'
id: 'kaniko-attempt-2'
waitFor: [ 'kaniko-attempt-1' ]
args: [
'--log-format=text',
'--context=dir:///workspace/ci',
'--dockerfile=ci/cloudbuild/dockerfiles/${_DISTRO}.Dockerfile',
'--cache=true',
'--destination=gcr.io/${PROJECT_ID}/${_IMAGE}:${BUILD_ID}',
'--image-fs-extract-retry=3',
'--image-download-retry=3',
'--push-retry=3'
]
allowFailure: true

# Pull the docker image. The step running 'ci/cloud/build.sh' would do this
# automatically, and also fill the log with about 2-3 pages of noise.
- name: 'gcr.io/${PROJECT_ID}/${_IMAGE}:${BUILD_ID}'
id: 'download-runner-image-attempt-2'
entrypoint: '/bin/true'

# Restores the homedir cache into /h in parallel with the previous step.
Expand Down

0 comments on commit ce52933

Please sign in to comment.