.travis.yml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. language: java
  2. sudo: false
  3. jdk:
  4. - openjdk11
  5. cache:
  6. directories:
  7. - $HOME/.m2
  8. env:
  9. global:
  10. - secure: "HftEaabMmWn5GwKFKksUkOcelc3Mn7xazwAEy+4d4gL1+F8VhID/6DCK7nas+afUymWnxTano8Rv4Ci5MWryNkNkTH+FUPWmF3xWezc3hajSyS7RB92IZ8VPetl4Fo8UI1WwM5apDEaugalPxkIf8a7N+lpG5X/Gpumwzo3Be3w=" # BINTRAY_API_KEY
  11. - secure: "oWFgRTVP6lyTa7qVxlvkpm20MtVc3BtmsNXQJS6bfg2A0o/iCQMNx7OD59BaafCLGRKvCcJVESiC8FlSylVMS7CDSyYu0gg70NUiIuHp4NBM5inFWYCy/PdQsCTzr5uvNG+rMFQpMFRaCV0FrfM3tLondcVkhsHL68l93Xoexx4=" # CODACY_PROJECT_TOKEN
  12. - secure: "zJxgytA2Ks5Xzv+7kUaUq+EBFNQw9Qec63lcMJVuXVWczjL16nKW1EzzV515ag+OWL46z3lEPForDhufw0VtFnNmaX68jkO0mp01eLrHApc1llN2Y/U8GBXfNNazN4+Kom4H+z/AO+wJr8EsKMMUczCdQ3APgd9uVI0hzXw/Z3M=" # GITHUB_API_KEY
  13. addons:
  14. apt:
  15. packages:
  16. - haveged
  17. install:
  18. - curl -o $HOME/.m2/settings.xml https://gist.githubusercontent.com/cryptobot/cf5fbd909c4782aaeeeb7c7f4a1a43da/raw/e60ee486e34ee0c79f89f947abe2c83b4290c6bb/settings.xml
  19. - 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
  20. script:
  21. - mvn --update-snapshots -fmain/pom.xml clean test verify -Pcoverage
  22. after_success:
  23. - 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
  24. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/commons/target/site/jacoco/jacoco.xml --partial
  25. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/keychain/target/site/jacoco/jacoco.xml --partial
  26. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/ui/target/site/jacoco/jacoco.xml --partial
  27. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/launcher/target/site/jacoco/jacoco.xml --partial
  28. - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar final
  29. before_deploy:
  30. - |
  31. if [[ -n "$TRAVIS_TAG" ]]; then
  32. mvn -fmain/pom.xml org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=$TRAVIS_TAG
  33. elif [[ $TRAVIS_BRANCH == "develop" ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]]; then
  34. mvn -fmain/pom.xml org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=SNAPSHOT-$(echo $TRAVIS_COMMIT | head -c7)
  35. fi
  36. - mvn -fmain/pom.xml clean package -Prelease -DskipTests
  37. deploy:
  38. - provider: script # SNAPSHOTS
  39. skip_cleanup: true
  40. script: >-
  41. curl -T main/ant-kit/target/antkit.zip
  42. -u cryptobot:${BINTRAY_API_KEY}
  43. -H "X-Bintray-Package:ant-kit"
  44. -H "X-Bintray-Version:continuous"
  45. -H "X-Bintray-Override:1"
  46. -H "X-Bintray-Publish:1"
  47. https://api.bintray.com/content/cryptomator/cryptomator/antkit-continuous.zip
  48. on:
  49. repo: cryptomator/cryptomator
  50. branch: develop
  51. condition: $TRAVIS_TAG = ''
  52. - provider: releases # RELEASE
  53. prerelease: false
  54. api_key: $GITHUB_API_KEY
  55. file:
  56. - "main/uber-jar/target/Cryptomator-$TRAVIS_TAG.jar"
  57. skip_cleanup: true
  58. on:
  59. repo: cryptomator/cryptomator
  60. tags: true
  61. - provider: script
  62. skip_cleanup: true
  63. script: >-
  64. curl -T main/buildkit/target/buildkit-linux.zip
  65. -u cryptobot:${BINTRAY_API_KEY}
  66. -H "X-Bintray-Package:buildkit"
  67. -H "X-Bintray-Version:${TRAVIS_TAG}"
  68. -H "X-Bintray-Override:1"
  69. -H "X-Bintray-Publish:1"
  70. https://api.bintray.com/content/cryptomator/cryptomator/buildkit-linux-${TRAVIS_TAG}.zip
  71. on:
  72. repo: cryptomator/cryptomator
  73. tags: true
  74. - provider: script
  75. skip_cleanup: true
  76. script: >-
  77. curl -T main/buildkit/target/buildkit-mac.zip
  78. -u cryptobot:${BINTRAY_API_KEY}
  79. -H "X-Bintray-Package:buildkit"
  80. -H "X-Bintray-Version:${TRAVIS_TAG}"
  81. -H "X-Bintray-Override:1"
  82. -H "X-Bintray-Publish:1"
  83. https://api.bintray.com/content/cryptomator/cryptomator/buildkit-mac-${TRAVIS_TAG}.zip
  84. on:
  85. repo: cryptomator/cryptomator
  86. tags: true
  87. - provider: script
  88. skip_cleanup: true
  89. script: >-
  90. curl -T main/buildkit/target/buildkit-win.zip
  91. -u cryptobot:${BINTRAY_API_KEY}
  92. -H "X-Bintray-Package:buildkit"
  93. -H "X-Bintray-Version:${TRAVIS_TAG}"
  94. -H "X-Bintray-Override:1"
  95. -H "X-Bintray-Publish:1"
  96. https://api.bintray.com/content/cryptomator/cryptomator/buildkit-win-${TRAVIS_TAG}.zip
  97. on:
  98. repo: cryptomator/cryptomator
  99. tags: true