Skip to content

Commit

Permalink
fix deployment
Browse files Browse the repository at this point in the history
* use 20 minutes for stagingProgressTimeoutMinutes
* coveralls only if verify was successful
* deploy also, if coveralls fails
  • Loading branch information
Busoniu authored and skynetsonar committed Nov 20, 2020
1 parent 30c4754 commit 150fbf0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
20 changes: 8 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
os: linux
dist: xenial
language: java
jdk:
- openjdk8
cache:
directories:
- $HOME/.m2
before_install:
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
install: "mvn install -DskipTests=true"
script: "mvn -e clean test jacoco:report coveralls:report"
script: "mvn -e -B verify"
after_success: "mvn clean verify jacoco:report coveralls:report"
deploy:
-
provider: script
- provider: script
script: .travis/deploy.sh
skip_cleanup: true
on:
repo: Mercateo/rest-schemagen-spring
branch: master
jdk: openjdk8
-
provider: script
script: .travis/deploy.sh
skip_cleanup: true
on:
repo: Mercateo/rest-schemagen-spring
tags: true
jdk: openjdk8
10 changes: 1 addition & 9 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
if [ ! -z "$TRAVIS_TAG" ]
then
echo "on a tag -> set pom.xml <version> to $TRAVIS_TAG"
mvn --settings .travis/settings.xml org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=$TRAVIS_TAG 1>/dev/null 2>/dev/null
else
echo "not on a tag -> keep snapshot version in pom.xml"
fi

mvn clean deploy --settings .travis/settings.xml -DskipTests=true -B -U
mvn deploy --settings .travis/settings.xml -DskipTests=true -B
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
<stagingProgressTimeoutMinutes>20</stagingProgressTimeoutMinutes>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 150fbf0

Please sign in to comment.