$ git clone git@github.com:spring-cloud/spring-cloud-release.git
+$ cd spring-cloud-release
+$ git checkout -b springCloudBuildRelease
+diff --git a/images/releasers.png b/images/releasers.png new file mode 100644 index 00000000..6920cda4 Binary files /dev/null and b/images/releasers.png differ diff --git a/images/releasersForMetaRelease.png b/images/releasersForMetaRelease.png new file mode 100644 index 00000000..6e9a0311 Binary files /dev/null and b/images/releasersForMetaRelease.png differ diff --git a/images/runningScBuildReleaser.png b/images/runningScBuildReleaser.png new file mode 100644 index 00000000..33ea65ec Binary files /dev/null and b/images/runningScBuildReleaser.png differ diff --git a/images/runningSpringCloudMetaReleaser.png b/images/runningSpringCloudMetaReleaser.png new file mode 100644 index 00000000..c4895308 Binary files /dev/null and b/images/runningSpringCloudMetaReleaser.png differ diff --git a/images/scBuildReleaser.png b/images/scBuildReleaser.png new file mode 100644 index 00000000..ad3fcd3b Binary files /dev/null and b/images/scBuildReleaser.png differ diff --git a/images/springCloudMetaRelease.png b/images/springCloudMetaRelease.png new file mode 100644 index 00000000..84c6c458 Binary files /dev/null and b/images/springCloudMetaRelease.png differ diff --git a/spring-cloud-release-tools.html b/spring-cloud-release-tools.html index 45782a50..824d3958 100644 --- a/spring-cloud-release-tools.html +++ b/spring-cloud-release-tools.html @@ -108,6 +108,12 @@ $(addBlockSwitches);
| + + | ++Whenever a release process is broken, Jenkins marks it with a red ball and breaks the build. Whenever a post-release action went wrong but the release is successful, Jenkins marks the build with a yellow ball and marks the build as unstable. + | +
Let us assume that we are to release spring-cloud-build project. We need to do the following steps:
Create a branch (for example, springCloudBuildRelease) in a project that contains a BOM (for example, spring-cloud-release). The following example shows how to do so:
$ git clone git@github.com:spring-cloud/spring-cloud-release.git
+$ cd spring-cloud-release
+$ git checkout -b springCloudBuildRelease
+Update all versions as if you were doing a release train. We need to update the project’s versions, Boot version, and dependencies versions, too. Let us assume that we will eventually be doing a release train for the Hoxton.M1 release, Spring Boot to the latest available one, and spring-cloud-commons to 1.2.3.BUILD-SNAPSHOT. The following example shows how to do so:
// setting the release train value
+$ ./mvnw versions:set -DnewVersion=Hoxton.M1 -DgenerateBackupPoms=false -DprocessAllModules=true
+// Update all parent versions
+$ ./mvnw versions:update-parent -DgenerateBackupPoms=false -DprocessAllModules=true
+// Setting the necessary dependencies
+$ ./mvnw versions:set-property -Dproperty=spring-cloud-commons.version -DnewVersion=1.2.3.BUILD-SNAPSHOT -pl spring-cloud-dependencies -DgenerateBackupPoms=false
+// NOTE!!!
+// Verify that the versions set by Maven are correct!!
+$ git diff
+// commit and push the branch
+$ git add . && git commit -m "Updating project for Spring Cloud Build release" && git push origin springCloudBuildRelease
+| + + | +
+If you’re doing a e.g. M1 release, remember to not have any snapshot versions in this branch.
+ |
+
Since the project is prepared, go to Jenkins and select the Releaser view, which the following image shows:
+
+Pick the proper releaser project (for example, spring-cloud-build-releaser). The following image shows the settings for this example:
+Next, click Build with parameters. The following image shows the UI for doing so:
+Pick from which branch you would like the project (for example, spring-cloud-build - defaults to master) to be built and update the RELEASER_POM_BRANCH to point to the checked-out branch of Spring Cloud Release (for example, springCloudBuildRelease). You can pick whether you want to perform only post-release tasks or the whole release.
Finally, click Build.
You are done!
+As a post action, do not forget to remove the branch. The following example shows how to do so:
+// to synchronize any deleted branches (don't run this if you want leave any deleted branches that were deleted in the origin)
+$ git fetch -p
+$ git branch -d springCloudBuildRelease
+$ git push origin --delete springCloudBuildRelease
+We call a release train a meta-release. In order to perform one, you need to:
In your project (which must contain a BOM, such as spring-cloud-release) you have to have a branch, where you store properties with versions of your projects. For example, the branch name can be jenkins-releaser-config). The folloiwng example shows how to do so:
$ git clone git@github.com:spring-cloud/spring-cloud-release.git
+$ cd spring-cloud-release
+$ git checkout jenkins-releaser-config
+Create a file that contains all properties for a given release train. The name of the release train should be lowercase, and dots should be converted to underscores. For example, for the Greenwich.SR2 release train we need to have a file named greenwich_sr2.properties. The following example shows how to do so:
$ touch greenwich_sr2.properties
+We need to update the file with all versions for the release train. The properties file contains an ordered list of releaser.fixed-versions[project-name]=project-version entries, as the following listing shows:
$ echo "releaser.fixed-versions[spring-boot]=2.1.5.RELEASE
+releaser.fixed-versions[spring-cloud-build]=2.1.5.RELEASE
+releaser.fixed-versions[spring-cloud-commons]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-function]=2.0.2.RELEASE
+releaser.fixed-versions[spring-cloud-stream]=Fishtown.SR3
+releaser.fixed-versions[spring-cloud-aws]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-bus]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-task]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-config]=2.1.3.RELEASE
+releaser.fixed-versions[spring-cloud-netflix]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-cloudfoundry]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-kubernetes]=1.0.2.RELEASE
+releaser.fixed-versions[spring-cloud-openfeign]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-consul]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-gateway]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-security]=2.1.3.RELEASE
+releaser.fixed-versions[spring-cloud-sleuth]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-zookeeper]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-contract]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-gcp]=1.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-vault]=2.1.2.RELEASE
+releaser.fixed-versions[spring-cloud-release]=Greenwich.SR2" >> greenwich_sr2.properties
+$ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2 properties" && git push origin jenkins-releaser-config
+Since the project is prepared, go to Jenkins and select the Releaser view, as the following image shows:
+
+Pick the proper meta-releaser project (for example, spring-cloud-meta-releaser), as the following image shows:
+Next, click Build with parameters.
+You have quite a few options to pick, but the most important one is to set the value of the RELEASE_VERSION to the given release train version (for example, Greenwich.SR2). Continue updating the rest of the fields if necessary and read the field descriptions and this documentation for more information.
Finally, click Build.
You are done!
+I got such an exception
+You may get an exception similar to the following:
To fix that just call
+To fix that just call, run the following commands before running the app:
before running the app
-