-
Notifications
You must be signed in to change notification settings - Fork 104
/
build.sh
executable file
·35 lines (28 loc) · 1.04 KB
/
build.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
#!/bin/bash
set -ex
# Since all the dockerfiles now require buildkit features.
export DOCKER_BUILDKIT=1
# Set the default value of BUILD_ROLLING to no.
export BUILD_ROLLING="${1:-no}"
DOCKER=docker
if [ "$BUILD_ROLLING" = "yes" ]; then
echo "Building rolling releases..."
# Build the mailman-core image.
$DOCKER build -f core/Dockerfile.dev \
--label version.git_commit="$COMMIT_ID" \
-t maxking/mailman-core:rolling core/
# Build the mailman-web image.
$DOCKER build -f web/Dockerfile.dev \
--label version.git_commit="$COMMIT_ID" \
-t maxking/mailman-web:rolling web/
# build the postorius image.
$DOCKER build -f postorius/Dockerfile.dev\
--label version.git_commit="$COMMIT_ID"\
-t maxking/postorius:rolling postorius/
else
echo "Building stable releases..."
# Build the stable releases.
$DOCKER build -t maxking/mailman-core:rolling core/
$DOCKER build -t maxking/mailman-web:rolling web/
$DOCKER build -t maxking/postorius:rolling postorius/
fi