From a91724f221f89cc3b3fcb63a174a60cd1745049d Mon Sep 17 00:00:00 2001 From: Brian Demers Date: Fri, 11 Aug 2017 10:37:48 -0400 Subject: [PATCH] Cleanup CI build * Use travis deploy provider to deploy javadocs * Generate the jacoco XML report for use with codecov --- .travis.yml | 12 +++++++++++- okta-spring-security-starter/pom.xml | 18 ++++++++++++++++++ src/ci/build.sh | 5 ++--- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f63b01ef..4b8067ba3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,14 @@ before_install: script: - "./src/ci/build.sh" after_success: - - bash <(curl -s https://codecov.io/bash) -f okta-spring-security-starter/target/jacoco.exec \ No newline at end of file + - bash <(curl -s https://codecov.io/bash) -f okta-spring-security-starter/target/site/jacoco/jacoco.xml + +deploy: + - provider: pages + skip_cleanup: true + github_token: $GH_API_KEY + local_dir: target/gh-pages + email: developers@okta.com + name: Travis CI - Auto Doc Build + on: + branch: master \ No newline at end of file diff --git a/okta-spring-security-starter/pom.xml b/okta-spring-security-starter/pom.xml index cb40a758e..2b658bd2a 100644 --- a/okta-spring-security-starter/pom.xml +++ b/okta-spring-security-starter/pom.xml @@ -100,4 +100,22 @@ + + + + + org.jacoco + jacoco-maven-plugin + + + jacoco-report + + report + + verify + + + + + \ No newline at end of file diff --git a/src/ci/build.sh b/src/ci/build.sh index 99f14c7de..e8861fc5d 100755 --- a/src/ci/build.sh +++ b/src/ci/build.sh @@ -34,9 +34,8 @@ else $MVN_CMD deploy -Pci # also deploy the javadocs to the site - git config --global user.email "developers@okta.com" - git config --global user.name "travis-ci Auto Doc Build" - $MVN_CMD javadoc:aggregate scm-publish:publish-scm -Ppub-docs -Pci + git clone -b gh-pages https://github.com/${REPO_SLUG}.git target/gh-pages/ + $MVN_CMD javadoc:aggregate -Ppub-docs -Pci else # else try to run the ITs if possible (for someone who has push access to the repo if [ "$RUN_ITS" = true ] ; then