Skip to content

Commit

Permalink
Fix delivery.yaml to work with go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
njuettner committed Apr 10, 2019
1 parent 76c09da commit f6eeb3c
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions delivery.yaml
@@ -1,15 +1,23 @@
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: Build and push Docker image
- desc: build
cmd: |
make build.docker
- desc: push
cmd: |
if [[ $CDP_TARGET_BRANCH == master && ! $CDP_PULL_REQUEST_NUMBER ]]; then
RELEASE_VERSION=$(git describe --tags --always --dirty)
IMAGE=registry-write.opensource.zalan.do/teapot/external-dns:${RELEASE_VERSION}
IMAGE=registry-write.opensource.zalan.do/teapot/external-dns
VERSION=$(git describe --tags --always --dirty)
else
IMAGE=registry-write.opensource.zalan.do/teapot/external-dns-test:${CDP_BUILD_VERSION}
IMAGE=registry-write.opensource.zalan.do/teapot/external-dns-test
VERSION=$CDP_BUILD_VERSION
fi
docker build --squash --tag "$IMAGE" .
docker push "$IMAGE"
IMAGE=$IMAGE VERSION=$VERSION make build.push

0 comments on commit f6eeb3c

Please sign in to comment.