Skip to content

Commit

Permalink
Use docker buildkit in cloud builds.
Browse files Browse the repository at this point in the history
This saves time by skipping the build steps that aren't required for a prod build.
More information here: docker/cli#1134
  • Loading branch information
DominicRoyStang committed Apr 10, 2020
1 parent b8b06f2 commit dc98a74
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
steps:
- id: "Build backend"
name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "gcr.io/$PROJECT_ID/uvindex-backend:$SHORT_SHA", "./services/backend"]
args: ["build", "--progress=plain", "-t", "gcr.io/$PROJECT_ID/uvindex-backend:$SHORT_SHA", "./services/backend"]
env:
- 'DOCKER_BUILDKIT=1'

- id: "Build cli"
name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "gcr.io/$PROJECT_ID/uvindex-cli:$SHORT_SHA", "./services/cli"]
args: ["build", "--progress=plain", "-t", "gcr.io/$PROJECT_ID/uvindex-cli:$SHORT_SHA", "./services/cli"]
env:
- 'DOCKER_BUILDKIT=1'
waitFor: ["-"]

- id: "Push built backend image to registry"
Expand Down

0 comments on commit dc98a74

Please sign in to comment.