Last change
on this file since 32067 was 31844, checked in by floscher, 9 years ago |
[mapillary] Prevent Travis from leaking GitHub personal access token
|
File size:
1.5 KB
|
Line | |
---|
1 | language: java
|
---|
2 | cache:
|
---|
3 | directories: $HOME/.gradle
|
---|
4 | jdk:
|
---|
5 | - oraclejdk8
|
---|
6 | - oraclejdk7
|
---|
7 | - openjdk7
|
---|
8 | before_install: pip install --user codecov
|
---|
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
|
---|
13 | script: ./gradlew build javadoc
|
---|
14 |
|
---|
15 | # Release the plugin via GitHub releases when pushing a tag
|
---|
16 | before_deploy: 'cp -T build/libs/josm-mapillary-plugin.jar build/libs/Mapillary.jar'
|
---|
17 | deploy:
|
---|
18 | provider: releases
|
---|
19 | api_key: "${GH_TOKEN}"
|
---|
20 | file: "build/libs/Mapillary.jar"
|
---|
21 | skip_cleanup: true
|
---|
22 | on:
|
---|
23 | tags: true
|
---|
24 |
|
---|
25 | #Deploy to GitHub pages
|
---|
26 | after_script: |
|
---|
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/
|
---|
38 | cp -R build/reports/findbugs/ reports/findbugs/
|
---|
39 | git stage docs/ reports/
|
---|
40 | masterCommit=`git rev-parse master`
|
---|
41 | git commit -m "Publish developer resources to GitHub pages
|
---|
42 |
|
---|
43 | These resources are generated by Travis CI for commit $masterCommit using Gradle."
|
---|
44 | git push --quiet deploy gh-pages 1>/dev/null 2>&1
|
---|
45 | fi
|
---|
46 |
|
---|
47 | after_success: codecov
|
---|
Note:
See
TracBrowser
for help on using the repository browser.