Skip to content

Commit

Permalink
doc on steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mchmarny committed Feb 5, 2019
1 parent 92ef911 commit 1bd4ebd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions deployments/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
steps:

# pull latest code and test
- name: 'golang:latest'
id: Test
entrypoint: /bin/sh
args: ['-c','export GO111MODULE=on','go mod download','go test ./... -v']

# TODO: replace Build, Push, Deploy with ko

# build image
- name: 'gcr.io/cloud-builders/docker'
id: Build
args: ['build','-t','gcr.io/${PROJECT_ID}/${_APP_NAME}:${SHORT_SHA}','.']

# push image to gcr
- name: 'gcr.io/cloud-builders/docker'
id: Push
args: ['push','gcr.io/${PROJECT_ID}/${_APP_NAME}:${SHORT_SHA}']

# update manifest with few env var (mainly release tag)
- name: 'gcr.io/cloud-builders/gcloud'
id: Manifest
entrypoint: /bin/sh
Expand All @@ -25,6 +27,7 @@ steps:
's/PROJECT_ID/${PROJECT_ID}/g; s/RELEASE_TAG/${TAG_NAME}/g; s/IMAGE_SHA/${SHORT_SHA}/g' \
deployments/service.yaml > deployments/final.yaml
# deploy service to Knative cluster using the above gen'd manifest
- name: 'gcr.io/cloud-builders/kubectl'
id: Deploy
args: ['apply','-f','deployments/final.yaml']
Expand Down

0 comments on commit 1bd4ebd

Please sign in to comment.