-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathwercker.yml
61 lines (59 loc) · 1.69 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
61
dev:
# The container definition we want to use for developing our app
box:
id: golang:latest
cmd: /bin/sh
steps:
- internal/watch:
code: |
CGO_ENABLED=0 go build -o cloud-native-go
./cloud-native-go
reload: true
build:
# The container definition we want to use for building our app
box:
id: golang:latest
cmd: /bin/sh
steps:
- wercker/golint
- script:
name: install git
code: apk upgrade && apk update && apk add git
- script:
name: go build
code: |
go get github.com/iris-contrib/cloud-native-go@master
CGO_ENABLED=0 go build -o cloud-native-go
- script:
name: copy binary
code: cp cloud-native-go "$WERCKER_OUTPUT_DIR"
- script:
name: copy marathon script
code: cp marathon.sh "$WERCKER_OUTPUT_DIR"
deploy:
# The container definition we want to use to run our app
box:
id: alpine:latest
cmd: /bin/sh
steps:
- internal/docker-push:
author: "Iris Contrib"
username: $USERNAME
password: $PASSWORD
repository: iris-contrib/cloud-native-go
tag: 1.1.0 $WERCKER_GIT_COMMIT latest
registry: https://registry.hub.docker.com
entrypoint: /pipeline/source/cloud-native-go
ports: "8080"
- script:
name: generate json
code: chmod +x marathon.sh && ./marathon.sh
- script:
name: install curl
code: apk upgrade && apk update && apk add curl
# - wercker/marathon-deploy:
# marathon-url: $MARATHON_URL
# app-name: $APP_NAME
# app-json-file: $APP_NAME.json
# instances: "3"
# auth-token: $MARATHON_AUTH_TOKEN