forked from desagar/simple_es_client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
72 lines (63 loc) · 1.88 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
box: golang
dev:
steps:
- internal/watch:
code: |
go build ./...
./source
reload: true
build:
steps:
- wercker/golint
- script:
name: go build
code: |
CGO_ENABLED=0 go build -a -ldflags '-s' -installsuffix cgo -o $WERCKER_OUTPUT_DIR/w2s-ex .
cp $WERCKER_OUTPUT_DIR/w2s-ex $WERCKER_REPORT_ARTIFACTS_DIR
after-steps:
# for dev only, create a local image with --docker-local option, wercker build --docker-local
# 1. It needs to run build and docker push in the same pipeline
# so that docker image can see the files in $WERCKER_OUTPUT_DIR
# 2. --docker-local creates and tags docker image locally, it doesn't need registry info.
- internal/docker-scratch-push:
repository: wcr.io/wercker/w2s
tag: $WERCKER_GIT_BRANCH-$WERCKER_GIT_COMMIT
registry: https://wcr.io/v2
username: $WCR_USERNAME
password: $WCR_PASSWORD
cmd: ./w2s-ex
test-w2s:
steps:
- script:
name: test 1
code: pwd
- script:
name: test 2
code: ./w2s-ex &
- script:
name: test 3
code: curl http://localhost:5005/cities.json
push-wcr:
box:
id: alpine
cmd: /bin/sh
steps:
- internal/docker-scratch-push:
repository: wcr.io/wercker/w2s
tag: $WERCKER_GIT_BRANCH-$WERCKER_GIT_COMMIT
registry: https://wcr.io/v2
username: $WCR_USERNAME
password: $WCR_PASSWORD
cmd: ./w2s-ex
push-ocir:
box:
id: alpine
cmd: /bin/sh
steps:
- internal/docker-scratch-push:
repository: iad.ocir.io/odx-pipelines/spinnaker/w2s
tag: latest,$WERCKER_GIT_BRANCH-$WERCKER_GIT_COMMIT
registry: https://iad.ocir.io/v2
username: $OCIR_USERNAME
password: $OCIR_PASSWORD
cmd: ./w2s-ex