-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathwercker.yml
45 lines (44 loc) · 1.3 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
# The container definition we want to use for developing our app
box: golang:1.8
build:
steps:
- setup-go-workspace:
package-dir: github.com/kubermatic/k8sniff
- script:
name: install go tools
code: |
go version
go get -u -v github.com/golang/dep
go get -u -v github.com/golang/dep/cmd/dep
- script:
name: install dependencies
code: |
dep ensure
# Statically build the project
- script:
name: go build
code: CGO_ENABLED=0 go build -a -ldflags '-s' -installsuffix cgo -o k8sniff .
# Test the project
- script:
name: go test
code: go test $(glide nv)
# Copy binary to a location that gets passed along to the deploy pipeline
- script:
name: copy to deployment directory
code: |
cp -av k8sniff "$WERCKER_OUTPUT_DIR"
deploy:
box:
id: alpine:3.6
cmd: /bin/sh
docker-push:
- internal/docker-push:
name: push to docker hub as latest
author: Sebastian Scheele <[email protected]>
cmd: /pipeline/source/k8sniff
username: $USERNAME
password: $PASSWORD
email: [email protected]
tag: $WERCKER_GIT_COMMIT
repository: kubermatic/k8sniff
registry: https://registry.hub.docker.com