-
Notifications
You must be signed in to change notification settings - Fork 231
/
build-all-multiplatform.sh
executable file
·61 lines (48 loc) · 1.68 KB
/
build-all-multiplatform.sh
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
#!/bin/bash
set -eo pipefail
DEBEZIUM_VERSION="3.0"
if [ -z "$DEBEZIUM_VERSIONS" ]; then
DEBEZIUM_VERSIONS="$DEBEZIUM_VERSION"
fi
COMPONENTS=$*
if [ -z "$COMPONENTS" ]; then
COMPONENTS="mongo postgres debezium"
fi;
if [ -z "$MULTIPLATFORM_PLATFORMS" ]; then
MULTIPLATFORM_PLATFORMS="linux/amd64,linux/arm64"
fi;
echo ""
echo "****************************************************************"
echo "** Building components ${COMPONENTS} **"
echo "****************************************************************"
function shouldBuild() {
[[ "$COMPONENTS" =~ (" "|^)$1(" "|$) ]]
}
# A list of Debezium versions that should not be built
# with multi platform build
DEBEZIUM_SINGLEPLATFORM_VERSIONS="1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8"
MONGO_MULTIPLATFORM_VERSIONS="5.0 6.0 7.0"
POSTGRES_VERSIONS="12 13 14"
POSTGRES_MULTIPLATFORM_VERSIONS="15 16 17 12-alpine 13-alpine 14-alpine 15-alpine 16-alpine 17-alpine"
if shouldBuild "mongo"; then
for MONGO_VERSION in $MONGO_MULTIPLATFORM_VERSIONS; do
./build-mongo-multiplatform.sh "$MONGO_VERSION" "${MULTIPLATFORM_PLATFORMS}"
done
fi;
if shouldBuild "postgres"; then
for POSTGRES_VERSION in $POSTGRES_VERSIONS; do
./build-postgres-multiplatform.sh "$POSTGRES_VERSION" "linux/amd64"
done
for POSTGRES_VERSION in $POSTGRES_MULTIPLATFORM_VERSIONS; do
./build-postgres-multiplatform.sh "$POSTGRES_VERSION" "${MULTIPLATFORM_PLATFORMS}"
done
fi;
if shouldBuild "debezium"; then
for DBZ in $DEBEZIUM_VERSIONS; do
if [[ "${DEBEZIUM_SINGLEPLATFORM_VERSIONS}" =~ (" "|^)${DBZ}(" "|$) ]]; then
./build-debezium.sh "${DBZ}"
else
./build-debezium-multiplatform.sh "${DBZ}" "${MULTIPLATFORM_PLATFORMS}"
fi;
done
fi;