-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
48 lines (48 loc) · 1.9 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
language: java
sudo: false
jdk:
- oraclejdk8
env:
global:
- GITHUB_REPO_WEB: "pro-gen/pro-gen.github.io"
addons:
sonarcloud:
organization: "pro-gen-github"
token:
secure: "EBiUBu5BisJWAnxnU6RyOfkVh7YaM7UfmYfYuniVlI/XQxgv0fjxeiWsyEzFFPNHwIK0gRTJJGoxgVj+ITYg7M1LXDzzlvAO9gwIIiIROpFiwkrQID0qiZlnVaIowTYel6KEjZD96py80sRAqzBR/Q66OkyPYI/E4QzL5Y3TsIg="
before_script:
- rm -rf $TRAVIS_BUILD_DIR/gen-badge 2> /dev/null
- rm -rf $TRAVIS_BUILD_DIR/pro-gen.github.io 2> /dev/null
- git clone https://github.com/jirsis/gen-badge.git $TRAVIS_BUILD_DIR/gen-badge
- git clone https://${GH_TOKEN}@github.com/${GITHUB_REPO_WEB}.git $TRAVIS_BUILD_DIR/pro-gen.github.io
script:
- cd progen
- mvn clean verify site jacoco:report coveralls:jacoco sonar:sonar
after_success:
- mkdir $TRAVIS_BUILD_DIR/progen/target/pmd
- cp $TRAVIS_BUILD_DIR/progen/target/pmd.xml $TRAVIS_BUILD_DIR/progen/target/pmd
- mvn xml:transform
- cp $TRAVIS_BUILD_DIR/progen/target/generated-resources/xml/xslt/pmd.xml $TRAVIS_BUILD_DIR/progen/target/site/pmd.html
- node -v
- cd $TRAVIS_BUILD_DIR/gen-badge
- npm install
- "./gen-badges.js $TRAVIS_BUILD_DIR/progen/target/"
- git config --global user.email "[email protected]"
- git config --global user.name "Travis-CI deployer"
- git config --global push.default simple
- cd $TRAVIS_BUILD_DIR/pro-gen.github.io
- cp -v $TRAVIS_BUILD_DIR/progen/target/*svg .
- cp -v $TRAVIS_BUILD_DIR/progen/target/*xml .
- mkdir reports-mvn 2> /dev/null
- cp -r $TRAVIS_BUILD_DIR/progen/target/site/* reports-mvn
- git add -f *svg pmd.xml findbugs.xml checkstyle-result.xml
- git add -f reports-mvn/*
- git commit -q -m "Travis build $TRAVIS_BUILD_NUMBER pushed to ProGen page"
- git push --force --quiet "https://pro-gen:${GITHUB_API_KEY}@github.com/${GITHUB_REPO_WEB}.git"
- cd $TRAVIS_BUILD_DIR/progen
- pwd
- bash <(curl -s https://codecov.io/bash)
cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'