Skip to content

Commit

Permalink
testing travis-ci deployment from master only
Browse files Browse the repository at this point in the history
  • Loading branch information
tillias committed Oct 4, 2020
1 parent 5520f74 commit a0ba19b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ before_install:
install:
- npm install
script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$TRAVIS_PULL_REQUEST, BRANCH=$BRANCH"
- chmod +x mvnw
- ./mvnw -ntp checkstyle:check &&
./mvnw -ntp clean verify &&
Expand All @@ -48,7 +50,8 @@ script:
docker build -t tillias/microcatalog . &&
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin &&
docker push tillias/microcatalog &&
./mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy-only -Pheroku -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog
if [ "$BRANCH" = "master" ]; then
./mvnw -ntp com.heroku.sdk:heroku-maven-plugin:2.0.5:deploy-only -Pheroku -Dheroku.buildpacks=heroku/jvm -Dheroku.appName=microcatalog; fi

notifications:
webhooks:
Expand Down

0 comments on commit a0ba19b

Please sign in to comment.