2018-10-08 18:12:30 +02:00
|
|
|
version: "2017-09-20"
|
|
|
|
pipeline:
|
|
|
|
- id: build
|
|
|
|
overlay: ci/golang
|
2019-04-26 16:47:00 +02:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- /go/pkg/mod # pkg cache for Go modules
|
|
|
|
- ~/.cache/go-build # Go build cache
|
2018-10-08 18:12:30 +02:00
|
|
|
type: script
|
2019-10-01 11:54:37 +02:00
|
|
|
env:
|
|
|
|
GOFLAGS: "-mod=readonly"
|
2018-10-08 18:12:30 +02:00
|
|
|
commands:
|
|
|
|
- desc: test
|
|
|
|
cmd: |
|
|
|
|
make test
|
|
|
|
- desc: build
|
|
|
|
cmd: |
|
|
|
|
make build.docker
|
|
|
|
- desc: push
|
|
|
|
cmd: |
|
|
|
|
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
|
|
|
|
IMAGE=registry-write.opensource.zalan.do/teapot/kube-metrics-adapter
|
2019-10-01 11:54:37 +02:00
|
|
|
VERSION=$(git describe --tags --always)
|
2018-10-08 18:12:30 +02:00
|
|
|
else
|
|
|
|
IMAGE=registry-write.opensource.zalan.do/teapot/kube-metrics-adapter-test
|
2019-07-26 20:36:03 +02:00
|
|
|
VERSION=$CDP_BUILD_VERSION
|
2018-10-08 18:12:30 +02:00
|
|
|
fi
|
2019-10-01 11:54:37 +02:00
|
|
|
IMAGE=$IMAGE VERSION=$VERSION make build.docker
|
|
|
|
git diff --stat --exit-code
|
2019-07-26 20:36:03 +02:00
|
|
|
IMAGE=$IMAGE VERSION=$VERSION make build.push
|