From a96f7664da5e64cf652532b48d2778f24b013f4e Mon Sep 17 00:00:00 2001 From: aozarov Date: Mon, 6 Jul 2015 14:44:09 -0700 Subject: [PATCH] create site and maven artifacts only once and ignore pull requests --- .travis.yml | 4 +--- gcloud-java-core/pom.xml | 1 - gcloud-java-datastore/pom.xml | 1 - gcloud-java-examples/pom.xml | 1 - gcloud-java-storage/pom.xml | 1 - gcloud-java/pom.xml | 1 - pom.xml | 2 +- utilities/after_success.sh | 15 +++++++++++++++ 8 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 utilities/after_success.sh diff --git a/.travis.yml b/.travis.yml index 44f39d782b62..0850a6045028 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,7 @@ branches: only: - master after_success: -- mvn cobertura:cobertura coveralls:report -- mvn site-deploy -DskipTests=true --settings=target/travis/settings.xml -- mvn deploy -DskipTests=true -Dgpg.skip=true --settings target/travis/settings.xml +- utilities/after_success.sh env: global: - secure: "bjyc4GJSP9850m6KSO2LiGKMJI/iFJ6dIDNrrZJHiokWUv8ID5+X7O04YtAFF+WrYyVDJ8Zs+uduAJaQ5NFesnhFjMMNTOaliYIBjpBgdZU0vgmsU0NzO35bu6wA5DAdI8AGUNCVwSZpOAMnj/80dbYbyFwBn2DWBZ3QwpV6J/I=" diff --git a/gcloud-java-core/pom.xml b/gcloud-java-core/pom.xml index 3617ec2f7e6a..b577c4d29b7f 100644 --- a/gcloud-java-core/pom.xml +++ b/gcloud-java-core/pom.xml @@ -5,7 +5,6 @@ gcloud-java-core jar GCloud Java core - https://github.com/GoogleCloudPlatform/gcloud-java Core module for the gcloud-java. diff --git a/gcloud-java-datastore/pom.xml b/gcloud-java-datastore/pom.xml index 5b1f7d8d3a4c..8493d61c47c8 100644 --- a/gcloud-java-datastore/pom.xml +++ b/gcloud-java-datastore/pom.xml @@ -5,7 +5,6 @@ gcloud-java-datastore jar GCloud Java datastore - https://github.com/GoogleCloudPlatform/gcloud-java Java idiomatic client for Google Cloud Datastore. diff --git a/gcloud-java-examples/pom.xml b/gcloud-java-examples/pom.xml index 4f6bbfa9645b..6a8f534b4f08 100644 --- a/gcloud-java-examples/pom.xml +++ b/gcloud-java-examples/pom.xml @@ -5,7 +5,6 @@ gcloud-java-examples jar GCloud Java examples - https://github.com/GoogleCloudPlatform/gcloud-java Examples for gcloud-java. diff --git a/gcloud-java-storage/pom.xml b/gcloud-java-storage/pom.xml index a718b014aec4..a96245db716a 100644 --- a/gcloud-java-storage/pom.xml +++ b/gcloud-java-storage/pom.xml @@ -5,7 +5,6 @@ gcloud-java-storage jar GCloud Java storage - https://github.com/GoogleCloudPlatform/gcloud-java Java idiomatic client for Google Cloud Storage. diff --git a/gcloud-java/pom.xml b/gcloud-java/pom.xml index cc670b3c1ba2..be1ceb040181 100644 --- a/gcloud-java/pom.xml +++ b/gcloud-java/pom.xml @@ -5,7 +5,6 @@ gcloud-java jar GCloud Java - https://github.com/GoogleCloudPlatform/gcloud-java Java idiomatic client for Google Cloud Platform services. diff --git a/pom.xml b/pom.xml index 1e9c53220046..c824895e6c9a 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ github-pages-site Deployment through GitHub's site deployment plugin - http://googlecloudplatform.github.io/gcloud-java/ + site/${project.version}/ diff --git a/utilities/after_success.sh b/utilities/after_success.sh new file mode 100644 index 000000000000..a0d9200681e4 --- /dev/null +++ b/utilities/after_success.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# This script is used by Travis-CI to publish artifacts (binary, sorce and javadoc jars) when releasing snapshots. +# This script is referenced in .travis.yml. + +echo "Travis branch: " ${TRAVIS_BRANCH} +echo "Travis pull request: " ${TRAVIS_PULL_REQUEST} +echo "Travis JDK version: " ${TRAVIS_JDK_VERSION} +if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" -a "${TRAVIS_BRANCH}" == "master" -a "${TRAVIS_PULL_REQUEST}" == "false" ]; then + mvn cobertura:cobertura coveralls:report + mvn site-deploy -DskipTests=true --settings=target/travis/settings.xml + mvn deploy -DskipTests=true -Dgpg.skip=true --settings target/travis/settings.xml +else + echo "Not deploying artifacts. This is only done with non-pull-request commits to master branch with Oracle Java 7 builds." +fi