-
Notifications
You must be signed in to change notification settings - Fork 1
/
wercker.yml
60 lines (51 loc) · 1.57 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
53
54
55
56
57
58
59
60
box: golang:1.8
build:
base-path: /go/src/github.com/wercker/hello-world
steps:
- script:
name: Get app dependencies
code: go get
- script:
name: Build application
code: go build
push-release:
steps:
- internal/docker-push:
tag: $WERCKER_GIT_BRANCH-$WERCKER_GIT_COMMIT
working-dir: /pipeline/source
ports: "8080"
cmd: ./hello-world
#delete any existing Wercker secret before creating, to accommodate secret changes
inject-secret:
box:
id: alpine
cmd: /bin/sh
steps:
- kubectl:
name: delete secret
server: $KUBERNETES_MASTER
token: $KUBERNETES_TOKEN
insecure-skip-tls-verify: true
command: delete secret wercker; echo delete registry secret
- kubectl:
name: create secret
server: $KUBERNETES_MASTER
token: $KUBERNETES_TOKEN
insecure-skip-tls-verify: true
command: create secret docker-registry wercker --docker-server=$DOCKER_REGISTRY --docker-username=$DOCKER_USERNAME --docker-password=$KUBERNETES_TOKEN --docker-email=$DOCKER_EMAIL; echo create registry secret
deploy-to-cluster:
box:
id: alpine
cmd: /bin/sh
steps:
- bash-template
- script:
name: "Visualise Kubernetes config"
code: cat kubernetes.yml
- kubectl:
name: deploy to kubernetes
server: $KUBERNETES_MASTER
#username: $KUBERNETES_USERNAME
token: $KUBERNETES_TOKEN
insecure-skip-tls-verify: true
command: apply -f kubernetes.yml