Last change
on this file since 32039 was 31844, checked in by floscher, 9 years ago |
[mapillary] Prevent Travis from leaking GitHub personal access token
|
File size:
1.5 KB
|
Rev | Line | |
---|
[31393] | 1 | language: java
|
---|
[31407] | 2 | cache:
|
---|
| 3 | directories: $HOME/.gradle
|
---|
[31393] | 4 | jdk:
|
---|
| 5 | - oraclejdk8
|
---|
| 6 | - oraclejdk7
|
---|
| 7 | - openjdk7
|
---|
[31834] | 8 | before_install: pip install --user codecov
|
---|
[31821] | 9 | before_script: # init GUI for tests that can't run headless
|
---|
| 10 | - "export DISPLAY=:99.0"
|
---|
| 11 | - "sh -e /etc/init.d/xvfb start"
|
---|
| 12 | - sleep 3
|
---|
[31406] | 13 | script: ./gradlew build javadoc
|
---|
| 14 |
|
---|
[31408] | 15 | # Release the plugin via GitHub releases when pushing a tag
|
---|
[31818] | 16 | before_deploy: 'cp -T build/libs/josm-mapillary-plugin.jar build/libs/Mapillary.jar'
|
---|
[31408] | 17 | deploy:
|
---|
| 18 | provider: releases
|
---|
| 19 | api_key: "${GH_TOKEN}"
|
---|
[31818] | 20 | file: "build/libs/Mapillary.jar"
|
---|
[31408] | 21 | skip_cleanup: true
|
---|
| 22 | on:
|
---|
| 23 | tags: true
|
---|
| 24 |
|
---|
[31406] | 25 | #Deploy to GitHub pages
|
---|
[31818] | 26 | after_script: |
|
---|
[31406] | 27 | if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then
|
---|
| 28 | git config --global user.email "deploy@travis"
|
---|
| 29 | git config --global user.name "Travis CI"
|
---|
| 30 | git remote add deploy "https://floscher:${GH_TOKEN}@github.com/floscher/josm-mapillary-plugin.git"
|
---|
| 31 | git fetch --depth=1 origin gh-pages:gh-pages
|
---|
| 32 | git checkout gh-pages
|
---|
| 33 | git rm -r reports/ docs/
|
---|
| 34 | mkdir -p reports/ docs/
|
---|
| 35 | cp -R build/docs/javadoc/ docs/javadoc/
|
---|
| 36 | cp -R build/reports/tests/ reports/junit/
|
---|
| 37 | cp -R build/reports/jacoco/ reports/jacoco/
|
---|
[31407] | 38 | cp -R build/reports/findbugs/ reports/findbugs/
|
---|
[31406] | 39 | git stage docs/ reports/
|
---|
| 40 | masterCommit=`git rev-parse master`
|
---|
| 41 | git commit -m "Publish developer resources to GitHub pages
|
---|
[31407] | 42 |
|
---|
| 43 | These resources are generated by Travis CI for commit $masterCommit using Gradle."
|
---|
[31844] | 44 | git push --quiet deploy gh-pages 1>/dev/null 2>&1
|
---|
[31406] | 45 | fi
|
---|
[31834] | 46 |
|
---|
| 47 | after_success: codecov
|
---|
Note:
See
TracBrowser
for help on using the repository browser.