Skip to content

Commit

Permalink
Refactor the travis build
Browse files Browse the repository at this point in the history
- turn on jacocoa and coveralls reporting
- turn off slack notifications
- remove the redundant 'install' mvn build step
- make docs publish to snapshots/ or releases/
  • Loading branch information
Paul Warren committed Aug 23, 2019
1 parent 978327b commit 4084326
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
16 changes: 7 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
branches:
except:
- travis

language: java

jdk:
- openjdk8

env:
- BUILD_TYPE=snapshot
before_install:
- ./scripts/before-install.sh
install:
- mvn install -DskipTests=true -Dgpg.skip -Dmaven.javadoc.skip=true -B -V
- BUILD_TYPE=snapshot/$TRAVIS_BRANCH

script:
# - mvn test jacoco:report coveralls:report -Dgpg.skip -Dmaven.javadoc.skip=true -B
- mvn test -Dgpg.skip -Dmaven.javadoc.skip=true -B
- mvn install jacoco:report coveralls:report -Dgpg.skip -Dmaven.javadoc.skip=true -B -V

deploy:
- provider: script
script: scripts/deploy.sh
Expand All @@ -32,5 +32,3 @@ deploy:
on:
repo: paulcwarren/spring-content
tags: true
notifications:
slack: cloudfoundry:xvgjKLNQTyqAFMnsTywVHik9
8 changes: 2 additions & 6 deletions scripts/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
if [ ! -z "$TRAVIS_TAG" ]
then
echo "On a tag -> set pom.xml <version> to $TRAVIS_TAG and BUILD_TYPE to release"
export BUILD_TYPE=release
export BUILD_TYPE=release/$TRAVIS_TAG
mvn 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

echo BUILD_TYPE: $BUILD_TYPE
Expand All @@ -14,4 +10,4 @@ echo "Importing GPG keys"
openssl aes-256-cbc -K $encrypted_2d46c2ddc73e_key -iv $encrypted_2d46c2ddc73e_iv -in codesigning.asc.enc -out codesigning.asc -d
gpg --fast-import codesigning.asc

mvn -B -U -P ci,docs deploy --settings settings.xml -DskipTests=true scm-publish:publish-scm
mvn -B -U -P ci,docs deploy scm-publish:publish-scm -DskipTests=true --settings settings.xml

0 comments on commit 4084326

Please sign in to comment.