Skip to content

Commit

Permalink
update deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
acoshift committed Sep 1, 2018
1 parent 0488c1a commit c9d6a4c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ clean:

build:
env GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o acourse -ldflags '-w -s' main.go

production:
git push origin HEAD:production
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,9 @@ Acoshift's course system [acourse.io](https://acourse.io)

## Deployment

After GCB finished
[Staging](https://staging.acourse.io) will automated build and deploy when push commits to master using GCB.

### [Staging](https://staging.acourse.io)

Run `git push origin HEAD:staging` to trigger staging deployment.

### Production

Run `git push origin HEAD:production` to trigger production deployment.
Run `make production` to trigger production deployment.

## Testing

Expand Down
6 changes: 0 additions & 6 deletions cloudbuild.deploy.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ steps:

- name: gcr.io/cloud-builders/docker
args: [build, -t, gcr.io/$PROJECT_ID/acourse:$COMMIT_SHA, '.']
- name: gcr.io/cloud-builders/docker
args: [push, gcr.io/$PROJECT_ID/acourse:$COMMIT_SHA]

- name: acoshift/kubectl
args: [set, image, $_RESOURCE, acourse=gcr.io/$PROJECT_ID/acourse:$COMMIT_SHA]
env:
- SERVER=$_SERVER
- NAMESPACE=$_NAMESPACE
secretEnv:
- TOKEN

images:
- gcr.io/$PROJECT_ID/acourse:$COMMIT_SHA

secrets:
- kmsKeyName: projects/acourse-d9d0a/locations/global/keyRings/builder/cryptoKeys/key
secretEnv:
TOKEN: CiQAKWs1n/rPRIMPxVk/uoTbcskKPQfihk8kj9QGYNDfJvlK0UES8AYA2nfHugYZAmf44Smf/anCYE/MvjTfh/ExJNaiDgr3HJWKnVLpSmrxB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