-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
65 lines (59 loc) · 2.36 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
box: simonmenke/go-build:latest
build:
steps:
- setup-go-workspace
- script:
name: "go install"
code: |
CGO_ENABLED=0 go install -v ./cmd/...
- script:
name: "go test"
code: |
go test -v ./cmd/... ./internal/...
- script:
name: "go build"
code: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/k8s-linux-amd64/k8s ./cmd/k8s
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ${WERCKER_OUTPUT_DIR}/bin/k8s-darwin-amd64/k8s ./cmd/k8s
prerelease:
steps:
- script:
name: "Pull secrets"
code: |
curl -# https://gist.githubusercontent.com/fd/354eed3ebf924565741f0df980d11741/raw/sec.pem | sec dec | tar -C $HOME -x
eval "$(install-creds)"
- script:
name: "Push release"
code: |
mkdir -p dist
VERSION="$(v5n store bump k8s rc)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION"
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz .
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz .
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace --prerelease "v$VERSION" ./dist
- mbrevda/wercker-triggerbuild@0.0.10:
token: $WRK_TOKEN
application_id: $WRK_APP
message: Triggered from k8s
stable:
steps:
- script:
name: "Pull secrets"
code: |
curl -# https://gist.githubusercontent.com/fd/354eed3ebf924565741f0df980d11741/raw/sec.pem | sec dec | tar -C $HOME -x
eval "$(install-creds)"
- script:
name: "Push release"
code: |
mkdir -p dist
VERSION="$(v5n store bump k8s final+patch)"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-linux-amd64/k8s "$VERSION"
v5n apply --commit $WERCKER_GIT_COMMIT --author "Simon Menke" bin/k8s-darwin-amd64/k8s "$VERSION"
tar -C bin/k8s-linux-amd64 -f dist/k8s-linux-amd64.tar.gz -cz .
tar -C bin/k8s-darwin-amd64 -f dist/k8s-darwin-amd64.tar.gz -cz .
ghr -u fd -r k8s-utils -c $WERCKER_GIT_COMMIT --replace "v$VERSION" ./dist
- mbrevda/wercker-triggerbuild@0.0.10:
token: $WRK_TOKEN
application_id: $WRK_APP
message: Triggered from k8s