Use Circle CI for faster builds. (#181)

Move to Circle CI from Travis CI.
This commit is contained in:
Abhilash Raj
2017-11-05 18:41:00 -08:00
committed by GitHub
parent 389d166f2b
commit 12e7761c1f
7 changed files with 121 additions and 27 deletions

17
.travis/deploy.sh Normal file
View File

@@ -0,0 +1,17 @@
#! /bin/bash
deploy() {
REG_URL=${REGISTRY}_URL
REG_USER=${REGISTRY}_USER
REG_PASS=${REGISTRY}_PASS
docker login -u ${!REG_USER} -p ${!REG_PASS} ${!REG_URL}
docker push ${!REG_URL}/maxking/mailman-web:$1
docker push ${!REG_URL}/maxking/mailman-core:$1
}
if [ ! "$BRANCH" = "master" ] && [ "$PULL_REQUEST" ]; then
echo "Deploy only from master branch. This is $TRAVIS_BRANCH"
exit 0
fi
deploy

View File

@@ -7,12 +7,12 @@ deploy () {
}
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
if [ "$EVENT_TYPE" = "cron" ]; then
deploy "rolling"
elif [ "$TRAVIS_BRANCH" = "master" ]; then
elif [ "$BRANCH" = "master" ]; then
deploy "latest"
else
# If the branch isn't master and this was not a cron job, no need to deploy.
echo "TRAVIS_EVENT_TYPE = $TRAVIS_EVENT_TYPE, TRAVIS_BRANCH = $TRAVIS_BRANCH"
echo "EVENT_TYPE = $EVENT_TYPE, BRANCH = $BRANCH"
exit 0
fi