Skip to content

Commit

Permalink
Minor updates in travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaaano committed Feb 10, 2020
1 parent 258b026 commit 9eadcb2
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
env:
global:
- MAVEN_CMD="mvn --batch-mode --show-version"

os:
- linux

language: java

jdk:
Expand All @@ -12,31 +19,31 @@ before_install:
- openssl aes-256-cbc -K $encrypted_20a9906c1f0d_key -iv $encrypted_20a9906c1f0d_iv -in codesign.asc.enc -out codesign.asc -d
- gpg --batch --fast-import codesign.asc
- if [ -n "$TRAVIS_TAG" ]; then
mvn versions:set -DnewVersion=$TRAVIS_TAG;
$MAVEN_CMD versions:set -DnewVersion=$TRAVIS_TAG;
fi

install:
- mvn dependency:go-offline --batch-mode --show-version
- $MAVEN_CMD dependency:go-offline

script:
- mvn test --batch-mode --show-version
- $MAVEN_CMD test
- if [[ "$TRAVIS_JDK_VERSION" == "openjdk11" ]]; then
mvn clean deploy --batch-mode --show-version --activate-profiles sign --settings settings.xml -DskipTests -Dgpg.passphrase=$GPG_PASSPHRASE;
$MAVEN_CMD clean deploy --activate-profiles sign --settings settings.xml -DskipTests -Dgpg.passphrase=$GPG_PASSPHRASE;
fi

after_success:
- if [[ -n "$TRAVIS_TAG" && "$TRAVIS_JDK_VERSION" == "openjdk11" ]]; then
mvn nexus-staging:release --batch-mode --show-version --settings settings.xml;
$MAVEN_CMD nexus-staging:release --settings settings.xml;
fi

after_failure:
- if [[ -n "$TRAVIS_TAG" && "$TRAVIS_JDK_VERSION" == "openjdk11" ]]; then
mvn nexus-staging:drop --batch-mode --show-version --settings settings.xml;
$MAVEN_CMD nexus-staging:drop --settings settings.xml;
fi

deploy:
provider: releases
api_key:
token:
secure: "hdCqWk1eb803aRKc82L3RGaumX8evQJxpR3ZdeDB1LGr/FUimxSDPIZ1e9VcZeW9CtN7HD2UpRZ6g49rQ6mvLA7aA7/r7sEoKMpifByOm7gOl5ZEisK4IzePeqecbomrKXFfjWxB2ubkWAPyx6V4sXi8TP7AG+Nuv3/SmT3mdyg2VuxqrQWpcvv2T9wy2axmLiEL1eKOrdDDtjPR3oZQIAb/3qu8IWwylpaMAQ1FVyjIYBvpwIHyMWZPhuCLW/6VC8omiGn9KsenJ0Ia6haKY4rp8vxq8HOwWjpRec8zEgV+VZ5w+O7wQMZ1xPe4ZwPVyRItaaRPNPonQAkR+U7iOGDYpVNXrvQR8vKP7FTsXLR3LPuWrnl7dyjry94F+Nd5v4R99qMrFrwktWKEzB+iwwSzTw7L9/swtWTYOqy5B8/XjMubh0OtKvYxXd8lFKuBMl6DQhQdU4LEk15sMFdutN62othX7yy8HwfKnE+0TbKFzLL3RwT4SDTXQBLArH5gJco41CR7tXrw7YuymsNtgn2nSBX2F1jGDwVCGWGuVHF3C8c9Zi3k77r11OWcovEisE7peN1Ihcz/iH3+hBuG7BaNeW/0cIISYGIN9Ab7xZW5hs/J7ufPbl1LWWHPSid/9kClW/8drv60U6yWa1TsNeyMEpoSUj8BX11AhDlQCwc="
file_glob: true
file:
Expand Down

0 comments on commit 9eadcb2

Please sign in to comment.