.travis.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. sudo: false
  2. cache:
  3. directories:
  4. - $HOME/.m2
  5. language: java
  6. jdk:
  7. - oraclejdk8
  8. before_install:
  9. - git config user.name "$GIT_NAME"
  10. - git config user.email "$GIT_EMAIL"
  11. - git config credential.helper "store --file=.git/credentials"
  12. - echo "https://$GH_TOKEN:@github.com" > .git/credentials
  13. - gem install asciidoctor
  14. install:
  15. - ./mvnw install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
  16. - '[ "${MVN_GOAL}" == "deploy" ] && ./docs/src/main/asciidoc/ghpages.sh || echo "Not updating docs"'
  17. script:
  18. - './mvnw -s .settings.xml $MVN_GOAL $MVN_PROFILE -nsu -Dmaven.test.redirectTestOutputToFile=true'
  19. env:
  20. global:
  21. - GIT_NAME="Dave Syer"
  22. - GIT_EMAIL=dsyer@pivotal.io
  23. - CI_DEPLOY_USERNAME=buildmaster
  24. - FEATURE_BRANCH=$(echo ${TRAVIS_BRANCH} | grep -q "^.*/.*$" && echo true || echo false)
  25. - SPRING_CLOUD_BUILD=$(echo ${TRAVIS_REPO_SLUG} | grep -q "^spring-cloud/.*$" && echo true || echo false)
  26. - MVN_GOAL=$([ "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_TAG}" == "" -a "${FEATURE_BRANCH}" == "false" -a "${SPRING_CLOUD_BUILD}" == "true" ] && echo verify || echo install)
  27. - VERSION=$(mvn validate | grep Building | head -1 | sed -e 's/.* //')
  28. - MILESTONE=$(echo ${VERSION} | egrep 'M|RC' && echo true || echo false)
  29. - MVN_PROFILE=$([ "${MILESTONE}" == "true" ] && echo -P milestone)
  30. - MAVEN_SKIP_RC=true
  31. - MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=256M"
  32. - secure: "RlAkhuBBoUbd0QEp69la+sd0QfOZhg7cxs/BYiw5Z0Bvl0DCtDJCtXoezQXpeQkIkLzIWa8WjJSkM9aL9aP37bg/GzY3O4B2nuF5rw7otw0zua223ioent3MNbrqk+v2whBlOwCV4/LY3Qod3XvFnLRAQmNWnzSenwcJ4qUxP1Q="