forked from zalando/nakadi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelivery.yaml
67 lines (64 loc) · 2.35 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: "2017-09-20"
pipeline:
- id: test
type: script
vm_config:
type: linux
size: extra_large
image: cdp-runtime/jdk11
commands:
- desc: Checkstyle
cmd: |
./gradlew checkstyle --stacktrace
- desc: Test
cmd: |
./gradlew test --stacktrace
- id: acceptance-test
type: script
vm_config:
type: linux
size: extra_large
image: cdp-runtime/jdk11
commands:
- desc: Install dependencies
cmd: |
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
echo '04216d65ce0cd3c27223eab035abfeb20a8bef20259398e3b9d9aa8de633286d */usr/local/bin/docker-compose' | sha256sum -c
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
- desc: Acceptance Test
cmd: |
./gradlew fullAcceptanceTest --stacktrace
- id: build-push
type: script
vm_config:
type: linux
size: extra_large
image: cdp-runtime/jdk11
commands:
- desc: Build and push to repo
cmd: |
./gradlew clean app:bootJar
BASE_IMAGE="container-registry.zalando.net/library/eclipse-temurin-11-jre:latest"
MULTI_ARCH_IMAGE="container-registry-test.zalando.net/aruha/nakadi-oss:${CDP_BUILD_VERSION}"
IMAGE="registry-write.opensource.zalan.do/aruha/nakadi-oss:${CDP_BUILD_VERSION}"
if [ "$CDP_PULL_REQUEST_NUMBER" ]; then
IMAGE="registry-write.opensource.zalan.do/aruha/nakadi-oss-pr:${CDP_BUILD_VERSION}"
MULTI_ARCH_IMAGE="container-registry-test.zalando.net/aruha/nakadi-oss-pr:${CDP_BUILD_VERSION}"
fi
echo "Building multi-arch image"
docker buildx create \
--config /etc/cdp-buildkitd.toml \
--driver-opt network=host \
--name cdpbuildx \
--bootstrap \
--use
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ${MULTI_ARCH_IMAGE} \
--build-arg BASE_IMAGE=${BASE_IMAGE} \
--push .
cdp-promote-image ${MULTI_ARCH_IMAGE}
#echo "Building oss image"
docker build -t ${IMAGE} --build-arg BASE_IMAGE=${BASE_IMAGE} .
docker push ${IMAGE}