Skip to content

Commit

Permalink
create site and maven artifacts only once and ignore pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
aozarov committed Jul 6, 2015
1 parent 41ceb99 commit a96f766
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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="
Expand Down
1 change: 0 additions & 1 deletion gcloud-java-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<artifactId>gcloud-java-core</artifactId>
<packaging>jar</packaging>
<name>GCloud Java core</name>
<url>https://github.com/GoogleCloudPlatform/gcloud-java</url>
<description>
Core module for the gcloud-java.
</description>
Expand Down
1 change: 0 additions & 1 deletion gcloud-java-datastore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<artifactId>gcloud-java-datastore</artifactId>
<packaging>jar</packaging>
<name>GCloud Java datastore</name>
<url>https://github.com/GoogleCloudPlatform/gcloud-java</url>
<description>
Java idiomatic client for Google Cloud Datastore.
</description>
Expand Down
1 change: 0 additions & 1 deletion gcloud-java-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<artifactId>gcloud-java-examples</artifactId>
<packaging>jar</packaging>
<name>GCloud Java examples</name>
<url>https://github.com/GoogleCloudPlatform/gcloud-java</url>
<description>
Examples for gcloud-java.
</description>
Expand Down
1 change: 0 additions & 1 deletion gcloud-java-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<artifactId>gcloud-java-storage</artifactId>
<packaging>jar</packaging>
<name>GCloud Java storage</name>
<url>https://github.com/GoogleCloudPlatform/gcloud-java</url>
<description>
Java idiomatic client for Google Cloud Storage.
</description>
Expand Down
1 change: 0 additions & 1 deletion gcloud-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<artifactId>gcloud-java</artifactId>
<packaging>jar</packaging>
<name>GCloud Java</name>
<url>https://github.com/GoogleCloudPlatform/gcloud-java</url>
<description>
Java idiomatic client for Google Cloud Platform services.
</description>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<site>
<id>github-pages-site</id>
<name>Deployment through GitHub's site deployment plugin</name>
<url>http://googlecloudplatform.github.io/gcloud-java/</url>
<url>site/${project.version}/</url>
</site>
</distributionManagement>
<licenses>
Expand Down
15 changes: 15 additions & 0 deletions utilities/after_success.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a96f766

Please sign in to comment.