Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit f01a7ce

Browse files
author
Sameer Naik
committed
use kaniko executor for cloud builds
1 parent 5f7f6ca commit f01a7ce

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

cloudbuild.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
steps:
2-
- name: 'gcr.io/cloud-builders/docker'
3-
args: ['build', '-t', 'gcr.io/$PROJECT_ID/www:$REVISION_ID', '-t', 'gcr.io/$PROJECT_ID/www:latest', '.']
4-
- name: 'gcr.io/cloud-builders/docker'
5-
args: ['push', 'gcr.io/$PROJECT_ID/www:$REVISION_ID']
6-
images: ['gcr.io/$PROJECT_ID/www']
2+
3+
- name: gcr.io/kaniko-project/executor:latest
4+
args:
5+
- --dockerfile=Dockerfile
6+
- --destination=gcr.io/$PROJECT_ID/docs:${COMMIT_SHA}
7+
- --destination=gcr.io/$PROJECT_ID/docs:${_KANIKO_IMAGE_TAG}
8+
- --cache-repo=gcr.io/$PROJECT_ID/docs/cache
9+
- --cache=${_KANIKO_USE_BUILD_CACHE}
10+
- --no-push=${_KANIKO_NO_PUSH}
11+
- --snapshotMode=redo
12+
- --use-new-run
13+
- ${_KANIKO_EXTRA_ARGS}
14+
waitFor: ['-']
15+
16+
timeout: 120s
17+
18+
substitutions:
19+
_KANIKO_IMAGE_TAG: latest
20+
_KANIKO_NO_PUSH: 'false'
21+
_KANIKO_USE_BUILD_CACHE: 'true'
22+
_KANIKO_EXTRA_ARGS:
23+
24+
options:
25+
substitution_option: ALLOW_LOOSE
26+
27+
tags:
28+
- docs

0 commit comments

Comments
 (0)