We previously used the get_latest_ref.py script to fetch the latest commit sha for each project that passed CI correctly. Although, that has some challenges due to requiring Gitlab Auth token. It causes issues with building PRs and we don't want to share the Gitlab token with PR authors. Instead, this commit removes the code and sha references and Instead simply uses the primary master branch from each project to build the rolling release container image.
36 lines
1.0 KiB
Bash
Executable File
36 lines
1.0 KiB
Bash
Executable File
#!/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
|