This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 293
/
delivery.yaml
68 lines (58 loc) · 2.37 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
68
version: "2017-09-20"
pipeline:
- id: test-build-push
type: script
vm_config:
type: linux
size: extra_large
image: cdp-runtime/jdk11
env:
# Ensure that gradle will not be running after we are done using it,
# so that we can clean up volatile gradle files in the cache:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
commands:
- desc: Checkstyle
cmd: |
./gradlew checkstyle --stacktrace
- desc: Test
cmd: |
./gradlew test --stacktrace
- desc: Acceptance Test
cmd: |
if [ ! -f /usr/local/bin/docker-compose ]; then
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
chmod +x /usr/local/bin/docker-compose
fi
docker-compose --version
./gradlew fullAcceptanceTest --stacktrace
- desc: Build and push
cmd: |
./gradlew clean app:bootJar
# https://docs.gradle.org/current/userguide/dependency_resolution.html#sub:cache_copy
rm -f ~/.gradle/caches/modules-2/{*.lock,gc.properties}
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} \
--push .
cdp-promote-image ${MULTI_ARCH_IMAGE}
docker build -t ${IMAGE} .
docker push ${IMAGE}
cache:
paths:
- /usr/local/bin/docker-compose
- ~/.gradle/caches/modules-2/
- ~/.gradle/wrapper/