Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# See https://cloud.google.com/cloud-build/docs/build-config

# this must be specified in seconds. If omitted, defaults to 600s (10 mins)
timeout: 1200s
steps:
- name: gcr.io/cloud-builders/docker
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this conventional? I noticed some repos used gcr.io/k8s-staging-test-infra/gcb-docker-gcloud.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If your build process is driven by a Makefile or similar, you can use GCB to invoke that. We provide the gcr.io/k8s-testimages/gcb-docker-gcloud image, which contains components that are likely to be useful for your builds.
https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md#makefile-build-example

So, gcr.io/k8s-staging-test-infra/gcb-docker-gcloud image is for Makefile build, maybe...?

Because simple build example uses gcr.io/cloud-builders/docker (and I followed it.)
https://github.com/kubernetes/test-infra/blob/master/config/jobs/image-pushing/README.md#simple-build-example

args:
- build
- --tag=gcr.io/$PROJECT_ID/simulator-backend:$_GIT_TAG
- --tag=gcr.io/$PROJECT_ID/simulator-backend:latest
- -f=Dockerfile
- .
- name: gcr.io/cloud-builders/docker
args:
- build
- --tag=gcr.io/$PROJECT_ID/simulator-frontend:$_GIT_TAG
- --tag=gcr.io/$PROJECT_ID/simulator-frontend:latest
- -f=./web/Dockerfile
- .
substitutions:
_GIT_TAG: '12345'
_PULL_BASE_REF: 'master'
# this prevents errors if you don't use both _GIT_TAG and _PULL_BASE_REF,
# or any new substitutions added in the future.
options:
substitution_option: ALLOW_LOOSE
# this will push these images, or cause the build to fail if they weren't built.
images:
- 'gcr.io/$PROJECT_ID/simulator-frontend:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/simulator-backend:latest
- 'gcr.io/$PROJECT_ID/simulator-frontend:$_GIT_TAG'
- 'gcr.io/$PROJECT_ID/simulator-backend:latest