.travis.yml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. language: java
  2. sudo: false
  3. jdk:
  4. - oraclejdk9
  5. branches:
  6. except:
  7. - continuous # To avoid infinite loops, as this tag is created by this Travis config
  8. cache:
  9. directories:
  10. - $HOME/.m2
  11. env:
  12. global:
  13. - secure: "IfYURwZaDWuBDvyn47n0k1Zod/IQw1FF+CS5nnV08Q+NfC3vGGJMwV8m59XnbfwnWGxwvCaAbk4qP6s6+ijgZNKkvgfFMo3rfTok5zt43bIqgaFOANYV+OC/1c59gYD6ZUxhW5iNgMgU3qdsRtJuwSmfkVv/jKyLGfAbS4kN8BA=" # COVERITY_SCAN_TOKEN
  14. - secure: "lV9OwUbHMrMpLUH1CY+Z4puLDdFXytudyPlG1eGRsesdpuG6KM3uQVz6uAtf6lrU8DRbMM/T7ML+PmvQ4UoPPYLdLxESLLBat2qUPOIVBOhTSlCc7I0DmGy04CSvkeMy8dPaQC0ukgNiR7zwoNzfcpGRN/U9S8tziDruuHoZSrg=" # BINTRAY_API_KEY
  15. - secure: "oWFgRTVP6lyTa7qVxlvkpm20MtVc3BtmsNXQJS6bfg2A0o/iCQMNx7OD59BaafCLGRKvCcJVESiC8FlSylVMS7CDSyYu0gg70NUiIuHp4NBM5inFWYCy/PdQsCTzr5uvNG+rMFQpMFRaCV0FrfM3tLondcVkhsHL68l93Xoexx4=" # CODACY_PROJECT_TOKEN
  16. - secure: "cHpsjK67VHJZTWRQBIlSmHPW/CfiLbdWPqw2g3SYGZxYBqNGjmSi6MxevzZEjeUTG0vgKV8cXeHBczQkyIMcG3LYF5/oAB5BinJPr47dV55aNKdPWu7CVcBzthT5s6Wnv/C9n7E2HIQrHvdsXTeJ6f5Gnf9ZqBv0AncLSxHUEBw=" #GITHUB_API_KEY
  17. addons:
  18. apt:
  19. packages:
  20. - haveged
  21. coverity_scan:
  22. project:
  23. name: "cryptomator/cryptomator"
  24. notification_email: sebastian.stenzel@cryptomator.org
  25. build_command: "mvn -fmain/pom.xml clean test -DskipTests"
  26. branch_pattern: release.*
  27. install:
  28. - curl -o $HOME/.m2/settings.xml https://gist.githubusercontent.com/cryptobot/cf5fbd909c4782aaeeeb7c7f4a1a43da/raw/082261a990b96dcb3e9a3ddb96fc4c2e493f62c0/settings.xml
  29. - mvn -fmain/pom.xml clean install -DskipTests 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
  30. script:
  31. - mvn --update-snapshots -fmain/pom.xml clean test jacoco:report verify -Pcoverage
  32. after_success:
  33. - jdk_switcher use oraclejdk8
  34. - curl -o ~/codacy-coverage-reporter-assembly-latest.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/2.0.1/codacy-coverage-reporter-2.0.1-assembly.jar
  35. - $JAVA_HOME/bin/java -cp ~/codacy-coverage-reporter-assembly-latest.jar com.codacy.CodacyCoverageReporter -l Java -r main/jacoco-report/target/site/jacoco-aggregate/jacoco.xml
  36. before_deploy:
  37. - jdk_switcher use oraclejdk9
  38. - |
  39. if [ -n $TRAVIS_TAG ]; then
  40. mvn -fmain/pom.xml org.codehaus.mojo:versions-maven-plugin:2.5:set -DnewVersion=$TRAVIS_TAG
  41. else
  42. mvn -fmain/pom.xml org.codehaus.mojo:versions-maven-plugin:2.5:set -DnewVersion=SNAPSHOT-$TRAVIS_COMMIT
  43. git tag -f continuous
  44. git remote add gh https://cryptobot:${GITHUB_API_KEY}@github.com/cryptomator/cryptomator.git &2>/dev/null
  45. git push -f gh continuous
  46. git remote remove gh
  47. fi
  48. - mvn -fmain/pom.xml -Prelease package -DskipTests
  49. deploy:
  50. - provider: releases # CONTINUOUS
  51. prerelease: true
  52. api-key: $GITHUB_API_KEY
  53. tag_name: continuous
  54. overwrite: true
  55. file_glob: true
  56. file:
  57. - "main/uber-jar/target/Cryptomator-*.jar"
  58. - "main/ant-kit/target/antkit.tar.gz"
  59. skip_cleanup: true
  60. name: Cryptomator continuous build
  61. body: Automatically built on $(date +'%F %T %Z').
  62. on:
  63. repo: cryptomator/cryptomator
  64. branch: develop
  65. condition: $TRAVIS_TAG = ''
  66. - provider: releases # RELEASE
  67. prerelease: false
  68. api_key: $GITHUB_API_KEY
  69. file:
  70. - "main/uber-jar/target/Cryptomator-$TRAVIS_TAG.jar"
  71. - "main/ant-kit/target/antkit.tar.gz"
  72. skip_cleanup: true
  73. on:
  74. repo: cryptomator/cryptomator
  75. tags: true
  76. - provider: script
  77. script: "curl -X POST -u cryptobot:${BINTRAY_API_KEY} -H 'Content-Type: application/json' -d '{\"name\": \"${TRAVIS_TAG}\", \"vcs_tag\": \"${TRAVIS_TAG}\"}' https://api.bintray.com/packages/cryptomator/cryptomator/cryptomator-win/versions"
  78. on:
  79. repo: cryptomator/cryptomator
  80. tags: true
  81. - provider: script
  82. script: "curl -X POST -u cryptobot:${BINTRAY_API_KEY} -H 'Content-Type: application/json' -d '{\"name\": \"${TRAVIS_TAG}\", \"vcs_tag\": \"${TRAVIS_TAG}\"}' https://api.bintray.com/packages/cryptomator/cryptomator/cryptomator-osx/versions"
  83. on:
  84. repo: cryptomator/cryptomator
  85. tags: true