Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Replace kaniko with docker build
Browse files Browse the repository at this point in the history
Kaniko builds a bit faster and simplifies cloudbuild config a little by
automatically pushing images. Unfortunately it seems to build images that have
missing files, which then causes breakage downstream.
As an example:
GoogleContainerTools/kaniko#362
  • Loading branch information
sleepycat committed Jun 21, 2019
1 parent 8bcff8d commit d563bdd
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions api/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- name: 'mikewilliamson/usesthis-ci'
- name: mikewilliamson/usesthis-ci
id: start_arangodb
entrypoint: '/bin/sh'
entrypoint: /bin/sh
args: [
'-c',
"
Expand Down Expand Up @@ -37,12 +37,20 @@ steps:
- 'MINIO_SECRET_KEY=$_MINIO_SECRET_KEY'
- 'MINIO_BUCKET_NAME=$_MINIO_BUCKET_NAME'

- name: gcr.io/kaniko-project/executor:debug
dir: 'api'
- name: gcr.io/cloud-builders/docker
dir: api
args:
- '--destination=gcr.io/$PROJECT_ID/api:$BRANCH_NAME-$SHORT_SHA'
- '--destination=gcr.io/$PROJECT_ID/api:latest'
- '--dockerfile=./Dockerfile'
- '--reproducible'
- '--cache=true'
- '--cache-ttl=6h'
[
'build',
'-t',
'gcr.io/$PROJECT_ID/api:$BRANCH_NAME-$SHORT_SHA',
'-t',
'gcr.io/$PROJECT_ID/api:latest',
'-f',
'Dockerfile',
'.',
]

images:
- 'gcr.io/$PROJECT_ID/api:$BRANCH_NAME-$SHORT_SHA'
- 'gcr.io/$PROJECT_ID/api:latest'

0 comments on commit d563bdd

Please sign in to comment.