Automatic test, build and push from travis

This commit is contained in:
butomo1989
2017-04-19 13:24:42 +02:00
parent d6a2738620
commit cd155015d1
3 changed files with 101 additions and 49 deletions
Executable
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
# Bash version should >= 4 to be able to run this script.
if [ -z "$TRAVIS_TAG" ]; then
echo "UNIT TEST ONLY"
bash release.sh test all all 0.1
else
echo "Log in to docker hub"
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
echo "RUN UNIT TEST, BUILD DOCKER IMAGES AND PUSH THOSE TO DOCKER HUB"
bash release.sh all all all $TRAVIS_TAG
echo "Log out of docker hub"
docker logout
fi