forked from kubernetes/autoscaler
-
Notifications
You must be signed in to change notification settings - Fork 4
/
delivery.yaml
47 lines (44 loc) · 1.66 KB
/
delivery.yaml
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
46
47
version: "2017-09-20"
pipeline:
- id: build
vm_config:
type: linux
image: cdp-runtime/go
size: large
type: script
working_dir: /go/src/k8s.io/autoscaler
env:
VERSION: "v1.18.2-internal"
DOWNSTREAM: "registry-write.opensource.zalan.do/teapot/kube-cluster-autoscaler"
TARGET_NAME: "container-registry-test.zalando.net/teapot/kube-cluster-autoscaler"
commands:
- desc: "Installing dependencies"
cmd: |
apt-get update
apt-get install libseccomp-dev python -qq
hack/install-verify-tools.sh
go version
export PATH=$GOPATH/bin:$PATH
- desc: "Verify"
cmd: |
rm .zappr.yaml
GO111MODULE=auto hack/verify-all.sh -v
- desc: "Run the test suite"
cmd: |
cd cluster-autoscaler
make test-in-docker
- desc: "Build and release (multi-arch)"
cmd: |
if [[ "${CDP_TARGET_BRANCH}" != "zalando-cluster-autoscaler" || -n "${CDP_PULL_REQUEST_NUMBER}" ]]; then
VERSION="${VERSION}.dev-${CDP_TARGET_REPOSITORY_COUNTER}"
else
VERSION="${VERSION}.${CDP_TARGET_BRANCH_COUNTER}"
fi
IMAGE="${TARGET_NAME}:${VERSION}"
cd cluster-autoscaler && mkdir -p build/amd64 build/arm64
GOARCH=amd64 make build-in-docker && mv cluster-autoscaler build/amd64
GOARCH=arm64 make build-in-docker && mv cluster-autoscaler build/arm64
docker buildx create --config /etc/cdp-buildkitd.toml --driver-opt network=host --bootstrap --use
docker buildx build --rm -t "${IMAGE}" --platform linux/amd64,linux/arm64 --push \
--build-arg BUILD_FOLDER=build --build-arg BASEIMAGE=container-registry.zalando.net/library/static:latest .
cdp-promote-image "${IMAGE}"