Use Circle CI for faster builds. (#181)
Move to Circle CI from Travis CI.
This commit is contained in:
17
.travis/deploy.sh
Normal file
17
.travis/deploy.sh
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user