Skip to content

Commit a2afff4

Browse files
authored
fix: update cloud build for exitgates to not use Kaniko as the build image (#14283)
This is required as Kaniko doesn't support exposing the build artifact image to GCB, which is necessary in AR exit gates to chain the deployment process to stage/prod. Note Kaniko was used for caching purposes which is not necessary for the automated deployment pipeline.
1 parent c908d4a commit a2afff4

File tree

1 file changed

+4
-19
lines changed

1 file changed

+4
-19
lines changed
Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,10 @@
1616
# Reduce this timeout by moving the installation of Python runtimes to a separate base image
1717
timeout: 7200s # 2 hours for the first uncached run, can be lowered later.
1818
steps:
19-
# A single step using the Kaniko executor to build and cache
20-
- name: 'gcr.io/kaniko-project/executor:latest'
21-
args:
22-
# Specifies the Dockerfile path
23-
- '--dockerfile=.generator/Dockerfile'
24-
# Specifies the build context directory
25-
- '--context=.'
26-
# The final destination for the image
27-
- '--destination=us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-dev/python-librarian-generator:latest'
28-
# Enables Kaniko's remote registry caching
29-
- '--cache=true'
30-
# (Optional but recommended) Sets a time-to-live for cache layers
31-
- '--cache-ttl=24h'
32-
# Use a consistent, non-root UID/GID for automated builds.
33-
- '--build-arg=UID=1000'
34-
- '--build-arg=GID=1000'
35-
36-
# The 'images' section is no longer needed because Kaniko pushes the image itself.
37-
19+
- name: 'gcr.io/cloud-builders/docker'
20+
args: ['build','-f', '.generator/Dockerfile', '-t', 'us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-dev/python-librarian-generator', '.']
21+
images:
22+
- 'us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-dev/python-librarian-generator'
3823
options:
3924
logging: CLOUD_LOGGING_ONLY
4025
machineType: E2_HIGHCPU_32

0 commit comments

Comments
 (0)