-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwercker.yml
79 lines (65 loc) · 1.77 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
box:
id: golang
ports:
- "5000"
dev:
steps:
- internal/watch:
code: |
go build ./...
./source
reload: true
# Build definition
build:
steps:
# golint step!
- wercker/golint
# Build the project
- script:
name: go build
code: |
CGO_ENABLED=0 go build -a -o fun-with-golang ./...
# Test the project
- script:
name: go test
code: |
go test ./...
- script:
name: ls-wercker-root
code: |
echo WERCKER_ROOT=$WERCKER_ROOT; ls -ls $WERCKER_ROOT
- script:
name: copy-output
code: |
mv fun-with-golang $WERCKER_OUTPUT_DIR
- script:
name: ls-wercker-output-dir
code: |
echo WERCKER_OUTPUT_DIR=$WERCKER_OUTPUT_DIR; ls -ls $WERCKER_OUTPUT_DIR
- internal/docker-push:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
cmd: /pipeline/output/fun-with-golang
tag: latest
repository: rikgibson/fun-with-golang
ports: "5000"
registry: https://registry.hub.docker.com/v2
push-scratch-docker:
steps:
- script:
name: ls-wercker-root
code: |
echo WERCKER_ROOT=$WERCKER_ROOT; ls -ls $WERCKER_ROOT
- internal/docker-scratch-push:
username: $DOCKERHUB_USERNAME
password: $DOCKERHUB_PASSWORD
cmd: ./fun-with-golang
tag: latest
repository: rikgibson/fun-with-golang-scratch
ports: "5000"
registry: https://registry.hub.docker.com/v2
hello-world:
steps:
- script:
name: hello-world
code: echo $HELLO_MESSAGE