mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-09-30 14:51:13 +02:00
Cloud build is also really useful for devs that have limited resources to build Kaniko locally. This commit makes adds parameters to cloudbuild to make it easy to adjust to your own project.
23 lines
1.1 KiB
YAML
23 lines
1.1 KiB
YAML
steps:
|
|
# First, build kaniko
|
|
- name: "gcr.io/cloud-builders/docker"
|
|
args: ["build", "-f", "deploy/Dockerfile",
|
|
"-t", "gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:${COMMIT_SHA}", "."]
|
|
# Then, we want to build kaniko:debug
|
|
- name: "gcr.io/cloud-builders/docker"
|
|
args: ["build", "-f", "deploy/Dockerfile_debug",
|
|
"-t", "gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:debug-${COMMIT_SHA}", "."]
|
|
- name: "gcr.io/cloud-builders/docker"
|
|
args: ["build", "-f", "deploy/Dockerfile_debug",
|
|
"-t", "gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:debug", "."]
|
|
# Then, we want to build the cache warmer
|
|
- name: "gcr.io/cloud-builders/docker"
|
|
args: ["build", "-f", "deploy/Dockerfile_warmer",
|
|
"-t", "gcr.io/$PROJECT_ID/${_WARMER_IMAGE_NAME}:${COMMIT_SHA}", "."]
|
|
images: ["gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:${COMMIT_SHA}",
|
|
"gcr.io/$PROJECT_ID/${_EXECUTOR_IMAGE_NAME}:debug-${COMMIT_SHA}",
|
|
"gcr.io/$PROJECT_ID/${_WARMER_IMAGE_NAME}:${COMMIT_SHA}"]
|
|
substitutions:
|
|
_EXECUTOR_IMAGE_NAME: executor
|
|
_WARMER_IMAGE_NAME: warmer
|