.travis.yml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. dist: xenial
  2. language: java
  3. sudo: false
  4. jdk:
  5. - openjdk11
  6. cache:
  7. directories:
  8. - $HOME/.m2
  9. env:
  10. global:
  11. - secure: "HftEaabMmWn5GwKFKksUkOcelc3Mn7xazwAEy+4d4gL1+F8VhID/6DCK7nas+afUymWnxTano8Rv4Ci5MWryNkNkTH+FUPWmF3xWezc3hajSyS7RB92IZ8VPetl4Fo8UI1WwM5apDEaugalPxkIf8a7N+lpG5X/Gpumwzo3Be3w=" # BINTRAY_API_KEY
  12. - secure: "oWFgRTVP6lyTa7qVxlvkpm20MtVc3BtmsNXQJS6bfg2A0o/iCQMNx7OD59BaafCLGRKvCcJVESiC8FlSylVMS7CDSyYu0gg70NUiIuHp4NBM5inFWYCy/PdQsCTzr5uvNG+rMFQpMFRaCV0FrfM3tLondcVkhsHL68l93Xoexx4=" # CODACY_PROJECT_TOKEN
  13. - secure: "zJxgytA2Ks5Xzv+7kUaUq+EBFNQw9Qec63lcMJVuXVWczjL16nKW1EzzV515ag+OWL46z3lEPForDhufw0VtFnNmaX68jkO0mp01eLrHApc1llN2Y/U8GBXfNNazN4+Kom4H+z/AO+wJr8EsKMMUczCdQ3APgd9uVI0hzXw/Z3M=" # GITHUB_API_KEY
  14. addons:
  15. apt:
  16. packages:
  17. - haveged
  18. install:
  19. - curl -o $HOME/.m2/settings.xml https://gist.githubusercontent.com/cryptobot/cf5fbd909c4782aaeeeb7c7f4a1a43da/raw/e60ee486e34ee0c79f89f947abe2c83b4290c6bb/settings.xml
  20. - mvn -fmain/pom.xml clean install -DskipTests org.codehaus.mojo:versions-maven-plugin:help dependency:go-offline -Pcoverage,release # "clean install" needed until we can exclude artifacts currently in the reactor, see https://maven.apache.org/plugins/maven-dependency-plugin/go-offline-mojo.html#excludeReactor and https://issues.apache.org/jira/browse/MDEP-568
  21. script:
  22. - mvn --update-snapshots -fmain/pom.xml clean test verify -Pcoverage
  23. after_success:
  24. - curl -o ~/codacy-coverage-reporter.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/4.0.2/codacy-coverage-reporter-4.0.2-assembly.jar
  25. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/commons/target/site/jacoco/jacoco.xml --partial
  26. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/keychain/target/site/jacoco/jacoco.xml --partial
  27. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/ui/target/site/jacoco/jacoco.xml --partial
  28. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/launcher/target/site/jacoco/jacoco.xml --partial
  29. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar final
  30. before_deploy:
  31. - |
  32. if [[ -n "$TRAVIS_TAG" ]]; then
  33. mvn -fmain/pom.xml org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=$TRAVIS_TAG
  34. elif [[ $TRAVIS_BRANCH == "develop" ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]]; then
  35. mvn -fmain/pom.xml org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=SNAPSHOT-$(echo $TRAVIS_COMMIT | head -c7)
  36. fi
  37. - mvn -fmain/pom.xml clean package -Prelease -DskipTests
  38. - export TODAY=`date +'%Y-%m-%d'`; envsubst '$TRAVIS_TAG $TODAY' < .travis-deploy-release.tmpl.json > .travis-deploy-release.json
  39. deploy:
  40. - provider: bintray # SNAPSHOTS
  41. file: .travis-deploy-snapshot.json
  42. user: cryptobot
  43. key: $BINTRAY_API_KEY
  44. skip_cleanup: true
  45. on:
  46. repo: cryptomator/cryptomator
  47. branch: develop
  48. - provider: bintray # RELEASES
  49. file: .travis-deploy-release.json
  50. user: cryptobot
  51. key: $BINTRAY_API_KEY
  52. skip_cleanup: true
  53. on:
  54. repo: cryptomator/cryptomator
  55. tags: true
  56. - provider: releases
  57. api_key: $GITHUB_API_KEY
  58. file_glob: true
  59. file:
  60. - "main/buildkit/target/buildkit-*.zip"
  61. skip_cleanup: true
  62. on:
  63. repo: cryptomator/cryptomator
  64. tags: true