Skip to content

Commit

Permalink
Travis: use deploy phase for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka committed Mar 27, 2017
1 parent a436af1 commit 7707bff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
global:
secure: "KncKGamS99AWFQNs2L4a3s65BdNvP07yD/fulNZA+tsBNVLgxsieXkRdzrA5Efxbd5PvnBJuLkYgjPFSFh4uPNwijH5PnZMsSYlnSFIbLyGAIkWx2cJeUoDXOOrbHIeRmCDS6gZjs9sUZHrVlhF9B/19txf4XUjpd/6slqdsEng=" # BINTRAY_API_KEY
matrix:
- HV_VERSION=4.3.2.Final
- HV_VERSION=4.3.2.Final DEPLOY=yes
- HV_VERSION=5.0.3.Final
- HV_VERSION=5.1.3.Final
- HV_VERSION=5.2.5.Final
Expand All @@ -26,4 +26,12 @@ script:
- mvn verify -Ptest-different-hv-version -Dhv.version.test=${HV_VERSION} --batch-mode
after_success:
- mvn jacoco:report coveralls:report
- script/travis-deploy

deploy:
provider: script
script: script/travis-deploy
skip_cleanup: true
on:
branch: master
jdk: oraclejdk8
condition: "$DEPLOY = yes"
12 changes: 0 additions & 12 deletions script/travis-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,9 @@ set -e

cd "$(dirname "$0")/.."

if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then
echo 'This is a pull request, skipping deploy.'; exit 0
fi

if [ -z "$BINTRAY_API_KEY" ]; then
echo '$BINTRAY_API_KEY is not set, skipping deploy.'; exit 0
fi

if [ "$TRAVIS_BRANCH" != 'master' ]; then
echo 'This is not the master branch, skipping deploy.'; exit 0
fi

if [ "${TRAVIS_BUILD_NUMBER}.5" != "$TRAVIS_JOB_NUMBER" ]; then
echo 'This is not the build job we are looking for, skipping deploy.'; exit 0
fi

echo '==> Deploying artifact to JFrog OSS Maven repository'
mvn deploy --settings .maven-bintray.xml -Dgpg.skip=true -DskipTests=true

0 comments on commit 7707bff

Please sign in to comment.