Skip to content

Commit

Permalink
Fix travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mkjsix committed Jun 21, 2019
1 parent 19e7512 commit afa1661
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions bin/maven-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
set -e

if [[ "$MAVEN_DEPLOY" == "true" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
RESTHEART_VERSION=$(./bin/project-version.sh 2>/dev/null);
RESTHEART_VERSION=$(./bin/project-version.sh 2>/dev/null)
export RESTHEART_VERSION
if [[ "$RESTHEART_VERSION" ]]; then
mvn clean verify -DskipITs=false -Dkarate.options="$KARATE_OPS"
echo "###### Branch is $TRAVIS_BRANCH";
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_TAG" ]]; then
echo "###### Building Docker image for RESTHeart $RESTHEART_VERSION";
echo "###### Branch is '$TRAVIS_BRANCH', Tag is '$TRAVIS_TAG', Version is '$VERSION'"
if [[ "$TRAVIS_TAG" && "$VERSION" != *-SNAPSHOT ]]; then
echo "###### Building Docker image for RESTHeart $RESTHEART_VERSION"
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
docker build -t softinstigate/restheart:$RESTHEART_VERSION . ;
docker build -t "softinstigate/restheart:$RESTHEART_VERSION" .
if [[ "$RESTHEART_VERSION" != *-SNAPSHOT ]]; then
docker push softinstigate/restheart:$RESTHEART_VERSION;
docker push "softinstigate/restheart:$RESTHEART_VERSION"
fi
echo "###### On master branch. Tagging image softinstigate/restheart:$RESTHEART_VERSION as latest";
docker tag softinstigate/restheart:$RESTHEART_VERSION softinstigate/restheart:latest;
docker push softinstigate/restheart:latest;
echo "###### Publishing Maven site at http://softinstigate.github.io/restheart/project-info.html";
mvn site --settings deploy-settings.xml -P report -Dmaven.test.skip=true;
echo "###### On master branch. Tagging image softinstigate/restheart:$RESTHEART_VERSION as latest"
docker tag "softinstigate/restheart:$RESTHEART_VERSION" softinstigate/restheart:latest
docker push softinstigate/restheart:latest
echo "###### Publishing Maven site at http://softinstigate.github.io/restheart/project-info.html"
mvn site --settings deploy-settings.xml -P report -Dmaven.test.skip=true
fi
echo "###### Deploy to Maven Central"
mvn deploy -s deploy-settings.xml -P release -Dmaven.test.skip=true
else
echo "###### ERROR! Variable RESTHEART_VERSION is undefined";
exit 1;
echo "###### ERROR! Variable RESTHEART_VERSION is undefined"
exit 1
fi
else
mvn verify -DskipITs=false
Expand Down

0 comments on commit afa1661

Please sign in to comment.