Use Circle CI for faster builds. (#181)
Move to Circle CI from Travis CI.
This commit is contained in:
25
build.sh
25
build.sh
@@ -9,8 +9,9 @@ if [ "$1" = "dev" ]; then
|
||||
export DEV=true
|
||||
fi
|
||||
|
||||
REG_URL=${REGISTRY}_URL
|
||||
|
||||
if [ "$TRAVIS_EVENT_TYPE" = "cron" ] || [ "$DEV" = "true" ] ; then
|
||||
if [ "$EVENT_TYPE" = "cron" ] || [ "$DEV" = "true" ] ; then
|
||||
python -m pip install python-gitlab
|
||||
# Get the latest commit for repositories and set their reference values to be
|
||||
# used in the development builds.
|
||||
@@ -25,23 +26,25 @@ if [ "$TRAVIS_EVENT_TYPE" = "cron" ] || [ "$DEV" = "true" ] ; then
|
||||
$DOCKER build -f core/Dockerfile.dev \
|
||||
--build-arg CORE_REF=$CORE_REF \
|
||||
--build-arg MM3_HK_REF=$MM3_HK_REF \
|
||||
-t maxking/mailman-core:rolling core/
|
||||
--label version.core="$CORE_REF" \
|
||||
--label version.mm3-hk="$MM3_HK_REF" \
|
||||
--label version.git_commit="$COMMIT_ID" \
|
||||
-t ${!REG_URL}/maxking/mailman-core:rolling core/
|
||||
|
||||
# Build the mailman-web image.
|
||||
$DOCKER build -f web/Dockerfile.dev \
|
||||
--label version.git_commit="$COMMIT_ID" \
|
||||
--label version.postorius="$POSTORIUS_REF" \
|
||||
--label version.hyperkitty="$HYPERKITTY_REF" \
|
||||
--label version.client="$CLIENT_REF" \
|
||||
--label version.dj-mm3="$DJ_MM3_REF" \
|
||||
--build-arg POSTORIUS_REF=$POSTORIUS_REF \
|
||||
--build-arg CLIENT_REF=$CLIENT_REF \
|
||||
--build-arg HYPERKITTY_REF=$HYPERKITTY_REF \
|
||||
--build-arg DJ_MM3_REF=$DJ_MM3_REF \
|
||||
-t maxking/mailman-web:rolling web/
|
||||
-t ${!REG_URL}/maxking/mailman-web:rolling web/
|
||||
else
|
||||
# Do the normal building process.
|
||||
if [ "$TRAVIS_BRANCH" = "master" ]; then
|
||||
TAG="latest"
|
||||
else
|
||||
TAG="$TRAVIS_BRANCH"
|
||||
fi
|
||||
|
||||
$DOCKER build -t maxking/mailman-core:$TAG core/
|
||||
$DOCKER build -t maxking/mailman-web:$TAG web/
|
||||
$DOCKER build -t ${!REG_URL}/maxking/mailman-core:$TAG core/
|
||||
$DOCKER build -t ${!REG_URL}/maxking/mailman-web:$TAG web/
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user