Skip to content

Commit 3a45d71

Browse files
committed
Update config for Travis-CI and add release deployment
1 parent 15ccc8a commit 3a45d71

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

.travis.yml

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
# Source language and JDK version to use
22
language: java
3-
jdk: oraclejdk7
3+
jdk: oraclejdk8
44

5-
# Compile and package JAR and set build properties
6-
install: mvn package -DbuildNumber=$TRAVIS_BUILD_NUMBER -DciSystem=travis -Dcommit=${TRAVIS_COMMIT:0:7}
5+
# Pre-install Maven dependencies
6+
install: mvn dependency:go-offline
77

8-
# Perform steps after compilation/test success
8+
# Compile and test source
9+
script: mvn clean -DbuildNumber=$TRAVIS_BUILD_NUMBER -DciSystem=travis -Dcommit=${TRAVIS_COMMIT:0:7}
10+
11+
# Fetch resources, run deployment goal/task, and generate Javadocs and reports
912
after_success:
10-
# Get files for use with build, namely the custom Maven settings.xml
11-
- "git clone https://github.com/flow/travis-ci-resources.git target/travis"
12-
# Check if commit s not a pull request, if git repo is official, and if branch is master. If checks pass, deploy artifacts to Maven repository
13-
- "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/React ]] && [[ $TRAVIS_BRANCH == master ]] && mvn deploy --settings target/travis/settings.xml"
14-
# Check if commit s not a pull request, if git repo is official, and if branch is master. If checks pass, update gh-pages branch with generated site/docs
15-
- "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/React ]] && [[ $TRAVIS_BRANCH == master ]] && chmod +x target/travis/update-gh-pages.sh && ./target/travis/update-gh-pages.sh"
13+
# Get files for use with build, namely the custom Maven settings.xml and scripts
14+
- "git clone https://github.com/flow/travis-ci-resources.git $HOME/build/flow/travis"
15+
# DEVELOP: Check if commit is not a pull request, if repo is official, if branch is not master; then deploy artifacts
16+
- "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/react ]] && [[ $TRAVIS_BRANCH == develop ]] && mvn deploy --settings $HOME/build/flow/travis/settings.xml"
17+
# RELEASE: Check if commit is not a pull request, if repo is official, if branch is master; then run deployment script
18+
- "[[ $TRAVIS_PULL_REQUEST == false ]] && [[ $TRAVIS_REPO_SLUG == flow/react ]] && [[ $TRAVIS_BRANCH == master ]] && $HOME/build/flow/travis/deploy.sh && $HOME/build/flow/travis/gh-pages.sh"
19+
# Generate Javadocs and report for Coveralls.io
20+
- "mvn javadoc:javadoc cobertura:cobertura coveralls:report -DserviceJobId=$TRAVIS_JOB_ID"
21+
22+
# RELEASE: Deploy main JAR to GitHub Releases
23+
deploy:
24+
provider: releases
25+
api-key: $GITHUB_TOKEN
26+
file: "target/flow-react-`cat version.txt`.jar"
27+
skip_cleanup: true
28+
on:
29+
branch: master
1630

1731
# Notification services
1832
notifications:
@@ -28,6 +42,7 @@ env:
2842
# Make the log output cleaner
2943
- TERM=dumb
3044
# Super secure, encrypted variables! Ssssh!
31-
- secure: "bZNAAo5zzbW7QdDENi3SC1iZM4aoa8ppke/A0BE4IAlug/G+0bu3YEYrWFgHM6fm6FyOslxc+XEMej4hfHd+Lmj4wXiFCKUfJlqE6AQV6yyHljQrjdkBnQeWiLdWX1oz9UjxdJpEFuGrSFZ9xW3fKnWfDgDT47rTAGK3VbDrkz8="
32-
- secure: "DfECXrCJyKdNVzsO2LMMMyHA3F9vFwn0g00kxM1zCllpULmSQgH5GzxqJOAqfWdx8F9kQOrRcxsBz5AqIxZ+rBrYaDJTM20ogMbiy1zcAVt+2qUfl1H5hKSQRCYp+wwRzMUpet0/t7ANUAQVfbZx51oocPGAJZQ1XpWGZfpAQ5A="
33-
- secure: "KLGHvbSzebvL6CVFMexEXsLCKhkEM4RexL/e9WgGtnvtsXQ/Dtz/VVMAJd9YCS/sHIgBYW+HRGO7NOA1b2Loc7qDGjO21oOuljswCKiwZ/lytpaJ0s8Ygp8SGHMdoHJg/lvNBoI3u9kMYNtzZeFR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