mirror of
https://github.com/zalando-incubator/kube-metrics-adapter.git
synced 2024-12-22 11:06:04 +00:00
20db592a62
Signed-off-by: Mikkel Oscar Lyderik Larsen <mikkel.larsen@zalando.de>
33 lines
877 B
YAML
33 lines
877 B
YAML
version: "2017-09-20"
|
|
pipeline:
|
|
- id: build
|
|
vm_config:
|
|
type: linux
|
|
image: "cdp-runtime/go"
|
|
cache:
|
|
paths:
|
|
- /go/pkg/mod # pkg cache for Go modules
|
|
- ~/.cache/go-build # Go build cache
|
|
type: script
|
|
env:
|
|
GOFLAGS: "-mod=readonly"
|
|
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
|
|
VERSION=$(git describe --tags --always)
|
|
else
|
|
IMAGE=registry-write.opensource.zalan.do/teapot/kube-metrics-adapter-test
|
|
VERSION=$CDP_BUILD_VERSION
|
|
fi
|
|
IMAGE=$IMAGE VERSION=$VERSION make build.docker
|
|
git diff --stat --exit-code
|
|
IMAGE=$IMAGE VERSION=$VERSION make build.push
|