Skip to content

Commit 5c021a4

Browse files
committed
---
yaml --- r: 4779 b: refs/heads/logging-alpha c: 67609ee h: refs/heads/master i: 4777: 746375b 4775: ca012ba
1 parent 7a4d527 commit 5c021a4

5 files changed

Lines changed: 22 additions & 12 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ refs/heads/compute-alpha: 969cba2627f1d53d352cc4a5ffe0879dacf65e6c
1212
refs/heads/dns-alpha: 2f90e7e338349287ace33375896907af0f032ca1
1313
refs/heads/dns-alpha-batch: 17442b07867021b85d0452f5f3eda29a3413288f
1414
refs/heads/gcs-nio: 283aeaf15efdcf3621eb6859f05e55ad7764375d
15-
refs/heads/logging-alpha: de23a122d17844ce59a95060877309fbe2daef34
15+
refs/heads/logging-alpha: 67609eef22aa04194cf2c40bd197522a0cfd60bb
1616
refs/tags/v0.1.0: a615317f7424ed58621b1f65d5c4d8cbbe8a6ed8
1717
refs/tags/v0.1.1: 7a7f6985fe465e9dd6a075af55493f42b4933be0
1818
refs/tags/v0.1.2: 3eb3fe866ba22487686048f45d927b8c8638ea3f

branches/logging-alpha/RELEASING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Most of the release process is handled by the `after_success.sh` script, trigger
88
This script takes an optional argument denoting the new version. By default, if the current version is X.Y.Z-SNAPSHOT, the script will update the version in all the pom.xml files to X.Y.Z. If desired, another version can be supplied via command line argument instead.
99

1010
2. Create a PR to update the pom.xml version. If releasing a new client library, this PR should also update javadoc grouping in the base directory's [pom.xml](./pom.xml).
11-
PRs that don't release new modules should look something like [#225](https://github.com/GoogleCloudPlatform/gcloud-java/pull/225). PRs that do release a new module should also add the appropriate packages to the javadoc groups "SPI" and "Test helpers", as shown in [#802](https://github.com/GoogleCloudPlatform/gcloud-java/pull/802) for `gcloud-java-dns`. After this PR is merged into GoogleCloudPlatform/gcloud-java, Travis CI will push a new website to GoogleCloudPlatform/gh-pages, push a new artifact to the Maven Central Repository, and update versions in the README files.
11+
PRs that don't release new modules should look something like [#225](https://github.com/GoogleCloudPlatform/gcloud-java/pull/225). PRs that do release a new module should also add the appropriate packages to the javadoc groups "SPI" and "Test helpers", as shown in [#802](https://github.com/GoogleCloudPlatform/gcloud-java/pull/802) for `gcloud-java-dns`. After this PR is merged into GoogleCloudPlatform/gcloud-java, Travis CI will push a new website to GoogleCloudPlatform/gh-pages, push a new artifact to the Maven Central Repository, and update versions in the README files. Do not merge in any non-release-related pull requests between the start of step 2 and the end of step 6. Between these steps, the project version is a non-snapshot version, so any commits to the master branch will cause Travis to spend extra resources attempting to redeploy artifacts.
1212

13-
3. Before moving on, verify that the artifacts have successfully been pushed to the Maven Central Repository. Open Travis CI, click the ["Build History" tab](https://travis-ci.org/GoogleCloudPlatform/gcloud-java/builds), and open the second build's logs for Step 2's PR. Be sure that you are not opening the "Pull Request" build logs. When the build finishes, scroll to the end of the log and verify that the artifacts were successfully staged and deployed. You can also search for `gcloud-java` on the [Sonatype website](https://oss.sonatype.org/#nexus-search;quick~gcloud-java) and check the latest version number. If the deployment didn't succeed because of a flaky test, rerun the build.
13+
3. Before moving on, verify that the artifacts have successfully been pushed to the Maven Central Repository. Open Travis CI, click the ["Build History" tab](https://travis-ci.org/GoogleCloudPlatform/gcloud-java/builds), and open the second build's logs for Step 2's PR. Be sure that you are not opening the "Pull Request" build logs. When the build finishes, scroll to the end of the log and verify that the artifacts were successfully staged and deployed. Search for `gcloud-java` on the [Sonatype website](https://oss.sonatype.org/#nexus-search;quick~gcloud-java) and check the latest version number. In rare cases (when the Maven plugin that determines the version of the repository fails), the artifacts may not be deployed even if the version in the pom.xml files doesn't contain `SNAPSHOT`. If the artifacts weren't deployed due to invalid version parsing or a flaky test, rerun the build.
1414

1515
4. Publish a release on Github manually.
1616
Go to the [releases page](https://github.com/GoogleCloudPlatform/gcloud-java/releases) and open the appropriate release draft. Make sure the "Tag Version" is `vX.Y.Z` and the "Release Title" is `X.Y.Z`, where `X.Y.Z` is the release version as listed in the `pom.xml` files. The draft should already have all changes that impact users since the previous release. To double check this, you can use the `git log` command and look through the merged master branch pull requests. Here is an example of the log command to get non-merge commits between v0.0.12 and v0.1.0:

branches/logging-alpha/utilities/after_success.sh

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,23 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
1212
if [ "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_BRANCH}" == "master" ]; then
1313
source ./utilities/integration_test_env.sh
1414
SITE_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
15+
echo "Used the maven-help-plugin to determine that the version is $SITE_VERSION"
16+
if [ "$SITE_VERSION" == "" ]; then
17+
echo "Could not determine the version, so we're exiting."
18+
exit 1
19+
fi
1520
if [ "${SITE_VERSION##*-}" != "SNAPSHOT" ]; then
16-
# Deploy site if not a SNAPSHOT
21+
# Deploy Maven artifacts (if they don't exist yet) and update artifact version in READMEs.
22+
URL=https://oss.sonatype.org/content/repositories/releases/com/google/gcloud/gcloud-java/$SITE_VERSION/
23+
if curl --output /dev/null --silent --head --fail "$URL"; then
24+
echo "Not deploying artifacts because it seems like they already exist."
25+
echo "Existence was checked using the url $URL"
26+
else
27+
mvn clean deploy -DskipITs --settings ~/.m2/settings.xml -P sign-deploy,release
28+
fi
29+
utilities/update_docs_version.sh
30+
31+
# Create website
1732
git config --global user.name "travis-ci"
1833
git config --global user.email "[email protected]"
1934
git clone --branch gh-pages --single-branch https://github.com/GoogleCloudPlatform/gcloud-java/ tmp_gh-pages
@@ -28,13 +43,9 @@ if [ "${TRAVIS_JDK_VERSION}" == "oraclejdk7" ]; then
2843
git add index.html
2944
echo "<html><head><script>window.location.replace('/gcloud-java/${SITE_VERSION}/apidocs' + location.search)</script></head><body></body></html>" > apidocs/index.html
3045
git add apidocs/index.html
31-
git commit -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect."
46+
git commit -m "Added a new site for version $SITE_VERSION and updated the root directory's redirect. [ci skip]"
3247
git config --global push.default simple
3348
git push --quiet "https://${CI_DEPLOY_USERNAME}:${CI_DEPLOY_PASSWORD}@github.com/GoogleCloudPlatform/gcloud-java.git" > /dev/null 2>&1
34-
35-
cd ..
36-
utilities/update_docs_version.sh # Update version in READMEs
37-
mvn clean deploy --settings ~/.m2/settings.xml -P sign-deploy,release
3849
else
3950
mvn clean deploy -DskipTests=true -Dgpg.skip=true --settings ~/.m2/settings.xml -P release
4051
fi

branches/logging-alpha/utilities/update_docs_version.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RELEASED_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate
1010
if [ "${RELEASED_VERSION##*-}" != "SNAPSHOT" ]; then
1111
echo "Changing version to $RELEASED_VERSION in README files"
1212
# Get list of directories for which README.md must be updated
13-
module_folders=($(find . -maxdepth 1 -name 'gcloud-java*' -type d) .)
13+
module_folders=($(find . -maxdepth 2 -type d | sed -E -n "/^\.\/(gcloud-java-contrib\/)?gcloud-java(-[a-z]+)+$/p") . ./gcloud-java)
1414
for item in ${module_folders[*]}
1515
do
1616
sed -ri "s/<version>[0-9]+\.[0-9]+\.[0-9]+<\/version>/<version>${RELEASED_VERSION}<\/version>/g" ${item}/README.md

branches/logging-alpha/utilities/update_pom_version.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
# Get the previous maven project version.
1212
CURRENT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev '(^\[|\w+:)')
1313
# Get list of directories for which pom.xml must be updated
14-
module_folders=($(find . -maxdepth 1 -name 'gcloud-java*' -type d) .)
15-
14+
module_folders=($(find . -maxdepth 2 -type d | sed -E -n "/^\.\/(gcloud-java-contrib\/)?gcloud-java(-[a-z]+)+$/p") . ./gcloud-java)
1615
if [ $# -eq 1 ]; then
1716
NEW_VERSION=$1
1817
elif [ "${CURRENT_VERSION##*-}" != "SNAPSHOT" ]; then

0 commit comments

Comments
 (0)