forked from kristenjacobs/polibot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwercker.yml
52 lines (49 loc) · 1.32 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
box:
id: golang
ports:
- "8081"
dev:
steps:
- internal/watch:
code: |
go build ./...
./source
reload: true
build:
steps:
- wercker/golint
- script:
name: go test
code: |
go test ./...
- script:
name: go build
code: |
CGO_ENABLED=0 GOOS=linux go build -a -o polibot ./...
- internal/docker-scratch-push:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
cmd: /maybot
tag: latest
repository: rikgibson/maybot
registry: https://registry.hub.docker.com
deploy:
box: google/golang
steps:
- script:
name: Create certificates
code: |
echo $CERTIFICATE_AUTHORITY_DATA | base64 --decode > ca.pem
echo $CLIENT_CERTIFICATE_DATA | base64 --decode > client.pem
echo $CLIENT_KEY_DATA | base64 --decode > client-key.pem
- kubectl:
name: Deploy new image
debug: true
server: $KUBERNETES_MASTER
certificate-authority: ca.pem
client-certificate: client.pem
client-key: client-key.pem
command: set image deployment/polibot polibot=kristenfjacobs/polibot:$WERCKER_GIT_COMMIT
- script:
name: Cleanup
code: rm -rf ca.pem client.pem client-key.pem