-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
83 lines (70 loc) · 1.73 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# The container definition we want to use for developing our application
box:
id: golang
ports:
- "8080"
dev:
steps:
- setup-go-workspace:
package-dir: github.com/tyslas/pipeline-go-wercker-glide
- script:
name: env
code: env
- script:
name: go get
code: |
cd $WERCKER_SOURCE_DIR
go version
go get -u github.com/Masterminds/glide
export PATH=$WERCKER_SOURCE_DIR/bin:$PATH
glide install
- internal/watch:
code: go run pipeline.go
reload: true
build:
steps:
- setup-go-workspace:
package-dir: github.com/tyslas/pipeline-go-wercker-glide
- script:
name: env
code: env
- script:
name: go get
code: |
cd $WERCKER_SOURCE_DIR
go version
go get -u github.com/Masterminds/glide
export PATH=$WERCKER_SOURCE_DIR/bin:$PATH
glide install
# Build the project
- script:
name: go build
code: |
go build
# Test the project
- script:
name: go test
code: |
go test -v $(glide novendor)
- script:
name: copy files to wercker output
code: |
cp -R ./ ${WERCKER_OUTPUT_DIR}
deploy:
steps:
- internal/docker-push:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
cmd: /pipeline/source/pipeline
port: "8080"
tag: latest
repository: tyslas/go-pipeline
registry: https://registry.hub.docker.com
- cng/cf-deploy:
api: $API
user: $USER
password: $PASSWORD
org: $ORG
space: $SPACE
appname: wercker-go-pipeline
docker_image: tyslas/go-pipeline