-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker copy.yml
executable file
·62 lines (54 loc) · 1.81 KB
/
wercker copy.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
61
62
build:
box: google/golang
steps:
# Test the project
- script:
name: go test
code: go test ./...
# Statically build the project
- script:
name: go build
code: CGO_ENABLED=0 go build -a -ldflags '-s' -installsuffix cgo -o app .
# Create cities-controller.json for initialization
- script:
name: create cities-controller.json
code: ./create_cities-controller.json.sh
# Copy binary to location that gets passed along to deploy
- script:
name: copy binary
code: cp app cities-service.json cities-controller.json "$WERCKER_OUTPUT_DIR"
deploy:
box: google/golang
steps:
# use the scratch step to build a container from scratch based on the files present
- internal/docker-scratch-push:
username: $QUAY_USERNAME
password: $QUAY_PASSWORD
cmd: ./app
tag: $WERCKER_GIT_COMMIT
ports: "5000"
repository: quay.io/grandmore/w2
registry: https://quay.io
# Run this to create the rc and service
initialize:
- kubectl:
server: $KUBERNETES_MASTER
username: $KUBERNETES_USERNAME
password: $KUBERNETES_PASSWORD
insecure-skip-tls-verify: true
command: create -f cities-controller.json
- kubectl:
server: $KUBERNETES_MASTER
username: $KUBERNETES_USERNAME
password: $KUBERNETES_PASSWORD
insecure-skip-tls-verify: true
command: create -f cities-service.json
# Update the replica controller to $WERCKER_GIT_COMMIT
rolling-update:
- kubectl:
server: $KUBERNETES_MASTER
username: $KUBERNETES_USERNAME
password: $KUBERNETES_PASSWORD
insecure-skip-tls-verify: true
command: rolling-update cities
image: quay.io/grandmore/w2:$WERCKER_GIT_COMMIT