-
-
Notifications
You must be signed in to change notification settings - Fork 239
Expand file tree
/
Copy pathbuild-all-multiplatform.sh
More file actions
executable file
·77 lines (63 loc) · 2.27 KB
/
build-all-multiplatform.sh
File metadata and controls
executable file
·77 lines (63 loc) · 2.27 KB
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
69
70
71
72
73
74
75
76
77
#!/bin/bash
set -eo pipefail
DEBEZIUM_VERSION="3.5"
if [ -z "$DEBEZIUM_VERSIONS" ]; then
DEBEZIUM_VERSIONS="$DEBEZIUM_VERSION"
fi
COMPONENTS=$*
if [ -z "$COMPONENTS" ]; then
COMPONENTS="postgres debezium mongodb"
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"
POSTGRES_VERSIONS="14"
POSTGRES_MULTIPLATFORM_VERSIONS="15 16 17 18 14-alpine 15-alpine 16-alpine 17-alpine 18-alpine"
MONGODB_VERSIONS="6.0-6.0"
MONGODB_MULTIPLATFORM_VERSIONS="6.0-6.0 7.0-7.0 8.0-8.0"
INFORMIX_VERSIONS="12 14 15"
docker buildx prune -f || true
if shouldBuild "postgres"; then
for POSTGRES_VERSION in $POSTGRES_MULTIPLATFORM_VERSIONS; do
./build-postgres-multiplatform.sh "$POSTGRES_VERSION" "${MULTIPLATFORM_PLATFORMS}"
done
for POSTGRES_VERSION in $POSTGRES_VERSIONS; do
./build-postgres-multiplatform.sh "$POSTGRES_VERSION" "linux/amd64"
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;
if shouldBuild "mongodb"; then
for MONGODB_VERSION in $MONGODB_MULTIPLATFORM_VERSIONS; do
RELEASE_VERSION="${MONGODB_VERSION%-*}"
BASE_VERSION="${MONGODB_VERSION#*-}"
./build-mongodb-multiplatform.sh "$RELEASE_VERSION" "$BASE_VERSION" "${MULTIPLATFORM_PLATFORMS}"
done
for MONGODB_VERSION in $MONGODB_VERSIONS; do
RELEASE_VERSION="${MONGODB_VERSION%-*}"
BASE_VERSION="${MONGODB_VERSION#*-}"
./build-mongodb-multiplatform.sh "$RELEASE_VERSION" "$BASE_VERSION" "linux/amd64"
done
fi;
if shouldBuild "informix"; then
for INFORMIX_VERSION in $INFORMIX_VERSIONS; do
./build-informix-multiplatform.sh "$INFORMIX_VERSION" "${MULTIPLATFORM_PLATFORMS}"
done
fi;