source: osm/applications/editors/josm/plugins/mapillary/.travis.yml@ 31818

Last change on this file since 31818 was 31818, checked in by floscher, 9 years ago

[mapillary] Improve Travis CI build

  • don't fail when javadoc errors occur
  • deploy developer resources also when build fails
File size: 1.3 KB
Line 
1language: java
2cache:
3 directories: $HOME/.gradle
4jdk:
5 - oraclejdk8
6 - oraclejdk7
7 - openjdk7
8script: ./gradlew build javadoc
9
10# Release the plugin via GitHub releases when pushing a tag
11before_deploy: 'cp -T build/libs/josm-mapillary-plugin.jar build/libs/Mapillary.jar'
12deploy:
13 provider: releases
14 api_key: "${GH_TOKEN}"
15 file: "build/libs/Mapillary.jar"
16 skip_cleanup: true
17 on:
18 tags: true
19
20#Deploy to GitHub pages
21after_script: |
22 if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
23 git config --global user.email "deploy@travis"
24 git config --global user.name "Travis CI"
25 git remote add deploy "https://floscher:${GH_TOKEN}@github.com/floscher/josm-mapillary-plugin.git"
26 git fetch --depth=1 origin gh-pages:gh-pages
27 git checkout gh-pages
28 git rm -r reports/ docs/
29 mkdir -p reports/ docs/
30 cp -R build/docs/javadoc/ docs/javadoc/
31 cp -R build/reports/tests/ reports/junit/
32 cp -R build/reports/jacoco/ reports/jacoco/
33 cp -R build/reports/findbugs/ reports/findbugs/
34 git stage docs/ reports/
35 masterCommit=`git rev-parse master`
36 git commit -m "Publish developer resources to GitHub pages
37
38 These resources are generated by Travis CI for commit $masterCommit using Gradle."
39 git push deploy gh-pages
40 fi
Note: See TracBrowser for help on using the repository browser.