All scripts can be found in the .kokoro
directory.
A commit to the main
branch will automatically trigger the prod:cloud-java-frameworks/spring-cloud-gcp/continuous
job that will publish snapshots to Sonatype Snapshots repository.
As opposed to the 1.x releases, the 2.0 release happens independent of the Spring Cloud release train. To simplify the process, perform this list of prerequisites before asking the release admin to run the release scripts.
-
Ensure that modules that shouldn’t be released are not included in the
<modules>
block in therelease
profile ofpom.xml
.
<profile>
<id>release</id>
<modules>
<!-- POM Modules-->
<module>spring-cloud-gcp-starters</module>
<module>spring-cloud-gcp-dependencies</module>
<!-- Code Modules-->
<module>spring-cloud-gcp-autoconfigure</module>
<module>spring-cloud-gcp-bigquery</module>
<module>spring-cloud-gcp-cloudfoundry</module>
<module>spring-cloud-gcp-core</module>
<module>spring-cloud-gcp-data-datastore</module>
<module>spring-cloud-gcp-data-firestore</module>
<module>spring-cloud-gcp-data-spanner</module>
<module>spring-cloud-gcp-logging</module>
<module>spring-cloud-gcp-pubsub</module>
<module>spring-cloud-gcp-pubsub-stream-binder</module>
<module>spring-cloud-gcp-security-iap</module>
<module>spring-cloud-gcp-storage</module>
<module>spring-cloud-gcp-secretmanager</module>
<module>spring-cloud-gcp-security-firebase</module>
<module>spring-cloud-gcp-vision</module>
...
</modules>
...
</profile>
-
Run the
prod:cloud-java-frameworks/spring-cloud-gcp/stage
Kokoro job. -
In the build logs, find the ID of the staging repository. You should see a log line that looks something like this:
[INFO] * Created staging repository with ID "comgooglecloud-1416".
The {STAGING_ID}
in this case is comgooglecloud-1416
.
-
Verify staged artifacts by going to
https://oss.sonatype.org/content/repositories/{STAGING_ID}/com/google/cloud/
NoteYou can also view all staged artifacts at http://oss.sonatype.org. To get access to com.google.cloud
group ID, please make a request similar to this one and ask someone who already has access to this group ID to vouch for you in the issue comments. -
If you want to drop the staged artifacts, run the
prod:cloud-java-frameworks/spring-cloud-gcp/drop
Kokoro job. Provide the staging repository ID as an environment variable (i.e.STAGING_REPOSITORY_ID=comgooglecloud-1416
). -
If you want to release the staged artifacts, run the
prod:cloud-java-frameworks/spring-cloud-gcp/promote
Kokoro job. Providing the staging repository ID as an environment variable (i.e.STAGING_REPOSITORY_ID=comgooglecloud-1416
). -
Verify that the new version has been published to Maven Central by checking here. This might take a while.
-
Create a new release on GitHub.
-
Publish the Javadocs (see section below).
-
Confirm the reference documentation was published: https://googlecloudplatform.github.io/spring-cloud-gcp/$RELEASE_VERSION/reference/html/index.html. See section below for more information.
-
Increment the project base patch version. For example, from
1.0.0-SNAPSHOT
to1.1.0-SNAPSHOT
, do:
$ ./mvnw versions:set -DprocessAllModules -DnewVersion=1.1.0-SNAPSHOT
After releasing a new version of Spring Cloud GCP, you will need to upload the javadocs for the released version.
The latest version of the docs can be accessed at the latest/
url:
https://googleapis.dev/java/spring-cloud-gcp/latest/index.html
-
Locate and open the
prod:cloud-java-frameworks/spring-cloud-gcp/publish_javadoc
Kokoro job. -
Add a new Github SCM and fill out the following parameters:
-
SCM Name: Set this to
spring-cloud-gcp
-
Committish: Set this to the name of the new release branch or tag that you want to publish javadocs for (like
1.2.x
orv2.0.4
). Note that you must already have the.kokoro/
scripts in the branch that you wish to publish javadocs for.
-
-
Run the job.
-
Verify that the javadocs are published. All uploaded javadocs will be published under the following URL:
https://googleapis.dev/java/spring-cloud-gcp/{BRANCH_VERSION_NAME}/index.html
Example: If you published the javadocs for version
2.0.4
, then the URL would be: https://googleapis.dev/java/spring-cloud-gcp/2.0.4/index.html
Our Spring documentation (a.k.a. reference docs, or refdocs) is automatically published to GitHub Pages when a new release is published.
This process is carried out by GitHub Actions by executing a script Pivotal wrote.
This script coordinates checking out the new release (by tag or branch name [called 'commitish']), building the refdocs, and pushing them to the gh-pages
branch, where GitHub is configured to automatically publish them to googlecloudplatform.github.io/spring-cloud-gcp
.
-
For GA releases, ask on the Spring Cloud GCP Gitter for the Spring team to update the API Documentation link to point to the newly published Ref doc and Javadocs.
-
Smoke test changes by running through a handful of our Spring Cloud GCP codelabs with the newly release version. Update the instructions as needed.