kube-metrics-adapter/delivery.yaml
Mikkel Oscar Lyderik Larsen f097e63401 Add build cache for CDP build (#49)
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
2019-04-26 16:47:00 +02:00

25 lines
644 B
YAML

version: "2017-09-20"
pipeline:
- id: build
overlay: ci/golang
cache:
paths:
- /go/pkg/mod # pkg cache for Go modules
- ~/.cache/go-build # Go build cache
type: script
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
else
IMAGE=registry-write.opensource.zalan.do/teapot/kube-metrics-adapter-test
fi
IMAGE=$IMAGE VERSION=$CDP_BUILD_VERSION make build.push