pmd/.travis.yml

71 lines
4.5 KiB
YAML
Raw Normal View History

2017-02-21 20:20:29 +01:00
sudo: false
language: java
jdk: oraclejdk8
before_install:
- echo "MAVEN_OPTS='-Xms1g -Xmx1g'" > "$HOME/.mavenrc"
- mkdir -p "$HOME/.m2"
- cp .travis/travis-toolchains.xml "$HOME/.m2/toolchains.xml"
- cp .travis/travis-settings.xml "$HOME/.m2/settings.xml"
- mkdir -p "$HOME/.ssh"
- chmod 700 "$HOME/.ssh"
- openssl aes-256-cbc -K $encrypted_c422865a395e_key -iv $encrypted_c422865a395e_iv -in .travis/id_rsa.enc -out "$HOME/.ssh/id_rsa" -d
- chmod 600 "$HOME/.ssh/id_rsa"
- mkdir -p "$HOME/.gpg"
- openssl aes-256-cbc -K $encrypted_c422865a395e_key -iv $encrypted_c422865a395e_iv -in .travis/release-signing-key-82DE7BE82166E84E.gpg.enc -out .travis/release-signing-key-82DE7BE82166E84E.gpg -d
- gpg2 --batch --import .travis/release-signing-key-82DE7BE82166E84E.gpg
2017-02-21 20:20:29 +01:00
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
before_script:
- SHOULD_DEPLOY=no
- '[ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ] && SHOULD_DEPLOY=yes || ( [ "${SHOULD_DEPLOY}" != "yes" ] && echo "Skipping Deploy" )'
- export SHOULD_DEPLOY
2017-01-27 20:46:58 -03:00
script:
- '[ "${SHOULD_DEPLOY}" = "yes" ] && mvn deploy --settings .travis/travis-settings.xml || ( [ "${SHOULD_DEPLOY}" != "yes" ] && echo "Skipping Deploy" )'
2017-01-27 20:46:58 -03:00
- '[ "${SHOULD_DEPLOY}" = "yes" ] || mvn verify'
- '[ "${SHOULD_DEPLOY}" = "yes" ] && mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar -Dsonar.host.url=https://sonarqube.com -Dsonar.login=${SONAR_TOKEN} || ( [ "${SHOULD_DEPLOY}" != "yes" ] && echo "Skipping Sonar" )'
2017-02-21 20:20:29 +01:00
after_success: true
2017-01-27 20:46:58 -03:00
2017-02-21 20:20:29 +01:00
before_deploy: true
2017-01-27 20:46:58 -03:00
deploy:
- provider: script
script: bash .travis/travis-deploy.sh
2017-02-21 20:20:29 +01:00
skip_cleanup: true
on:
tags: true
condition: "${TRAVIS_SECURE_ENV_VARS} = true"
2017-01-27 20:46:58 -03:00
- provider: releases
api_key: ${GITHUB_OAUTH_TOKEN}
file:
- "pmd-dist/target/pmd-*.zip"
- "target/pmd-doc-*.zip"
2017-02-21 20:20:29 +01:00
# TODO : This won't copy the changelog to GitHub
skip_cleanup: true
on:
tags: true
condition: "${TRAVIS_SECURE_ENV_VARS} = true"
after_deploy: true
2017-01-27 20:46:58 -03:00
notifications:
email:
recipients:
- adangel@users.sourceforge.net
on_success: always
on_failure: always
cache:
directories:
- "$HOME/.m2"
env:
global:
- secure: KBEuB6U1p5RQXSYe157AwydFr/zpXQPA0IChVCgZV+X1mMyy9ZtrjH1J1AXuviseDDXDbaT25sRnsvpl82rfRw2xOkMGXHy4N95/ylTSr8DjHxTao71BhXsvFycNobFva5y2EGNWqDvpS8I2oSZo7Qk4la3yep3rcJQvcy6RDbbhpDTbL1QMFyadunIBm0WtqbunrMqtjSqaoPsXz8TiQuxHvX4vEXzVbaxV1QQt79Vi+daa6wAV3mRQAugnx+UffsC8JqMxgm06usWeJgCJzxgm8E7clZCLmf53B2TL8dK6bIYbqyvOY3uFxitsTG0d8Z0GOJwXBgZNgbniTRO8ZJSty5eZP8LBybbjVLSL25DNTWtCjADUL/uySnXIEidlMt2N/3QmH7zrGAfAk/tIwKpdRca2GLLydeXf6PSkiahnPEkIY/QupcsOLELhdifpdOjb8QW1OenA+vUbNM9dccLwKnX6Fj9cu4VQG601AcYDr2eyhq8WYkr3wYdw/6KdUa3hmplowTBs+qguppP+eOSgGuEsy38KLtqnvm6WlHy6tcLmcVYKG3DmR1b7TWXsOXC6/VMH8BH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hHVuyaJJRRZHAncGiQ+uW/yL7G5rY51G6YSNJczzEtfrRg+YrIUbokUPmifSIbnXO/AIZRAq1dMhA8exRc5n+75RB1X164qm4a+yggdybFBh0L59xu606PJQJAuWy+x10nled7FAVXiotxbB0r2bhlVmWFEN+FWPqXg2rVkHvw6+5PM67rG5g1LCgjKzb9I6JWPiVI+EMn8Pw8gryL2Sdqtl08Da0Ypbl2ZK/afU4CEPEKnrDc9ecXKjacehTYwGS48V213XvArcmoEpsyZDRSMTrvK3/e29GEaxoK/ZzWJylpeOtsICEEFYEBEiDsiIW4C50MIUPT2xHV6MaPQzhkuwrbQ6QFYzHzihBaiQuMmXUQ4DMb3fOPkNZAQHQo8CgJ78IcbCABAoGv9mu/fo2KoLo11U="
# missing secure keys:
# PMD_SF_USER
# PMD_SF_PASSWORD
# CI_SIGN_KEYNAME
# CI_SIGN_PASSPHRASE
# add the encrypted GPG keyring file to repo (https://docs.travis-ci.com/user/encrypting-files/#Automated-Encryption), decrypt it and install it at the beginning of .travis-deploy.sh