releaser.meta-release.release-groups[0]=projectA,projectB,projectC
+diff --git a/reference/html/README.html b/reference/html/README.html index 5a0a69d8..a63a1f0d 100644 --- a/reference/html/README.html +++ b/reference/html/README.html @@ -98,6 +98,7 @@ $(addBlockSwitches);
Spring Cloud projects reuse the same pattern of building and deploying the applications. That’s -why this tool makes it easy to automate the release / dependency update process of our applications.
+Spring Cloud projects reuse the same pattern of building and deploying the applications. +That’s why this tool makes it easy to automate the release / dependency update process of our applications.
For a single project
+For a single project, by default if you opt in to all tasks
Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)
+Clones the BOM project and picks all versions
Modifies the project versions with values from a BOM (e.g. for Spring Cloud it’s Spring Cloud Release)
@@ -191,7 +192,7 @@ why this tool makes it easy to automate the release / dependency update processRuns the deployment of the artifacts
Publishes the docs (to spring-cloud-static for non-snapshots, to gh-pages for snapshots)
Publishes the docs (for Spring Cloud to spring-cloud-static for non-snapshots, to gh-pages for snapshots)
Reverts back to snapshots, bumps the version by a patch (1.0.1.RELEASE → 1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)
For GA/ SR release will create an issue in start.spring.io under https://github.com/spring-io/start.spring.io/issues/
For GA/ SR release will update the links under https://github.com/spring-cloud/spring-cloud-static/tree/gh-pages/current
For GA/ SR release will update the documentation links (for Spring Cloud https://github.com/spring-cloud/spring-cloud-static/tree/gh-pages/current)
Will update the release train project page (for Spring Cloud it will be https://github.com/spring-projects/spring-cloud)
All the tasks are opt in, so if you do opt in for everything you’ll get:
+config/releaser.yml.
+For the meta-releaser to work we assume that the path to the custom configuration file for each project is always config/releaser.yml.
| + + | +
+If you want to run some projects in parallel you have to set the releaser.meta-release.release-groups property to state which projects should be released in parallel. Example:
+ |
+
releaser.meta-release.release-groups[0]=projectA,projectB,projectC
+If in the list of projects you have projectA,projectB,projectC,projectD,projectE, then projectA,projectB,projectC will be released in parallel and then projectD and projectE sequentially.
The project consists of the following main modules
+releaser-core - with the core logic for doing releases
relaser-spring - with the Spring setup of tasks and a flow execution
projects
where each project has their configuration properties and additional tasks
+You can create your own project’s module and
+if you want to completely rewrite the flow of the release, just set releaser.flow.default-enabled to false and create the whole flow from scratch
if you want to modify the current flow, you can add new tasks by just creating a bean of a given type that extends the ReleaserTask and set its order accordingly.
Example of creating a new ReleaseReleaserTask called BuildCustomStuffTask:
package releaser.my_project;
+
+//...
+
+import releaser.internal.Releaser;
+import releaser.internal.spring.Arguments;
+import releaser.internal.spring.ExecutionResult;
+import releaser.internal.tasks.ReleaseReleaserTask;
+
+@Component
+public class BuildCustomStuffTask implements ReleaseReleaserTask {
+
+ /**
+ * Order of this task. The higher value, the lower order.
+ */
+ public static final int ORDER = 45;
+
+ @Override
+ public String name() {
+ return "build_custom_stuff";
+ }
+
+ @Override
+ public String shortName() {
+ return "bcf";
+ }
+
+ @Override
+ public String header() {
+ return "BUILDING CUSTOM STUFF";
+ }
+
+ @Override
+ public String description() {
+ return "Builds custom stuff";
+ }
+
+ @Override
+ public ExecutionResult runTask(Arguments args) {
+ // do some custom stuff basing on the arguments
+ return ExecutionResult.success();
+ }
+
+ @Override
+ public int getOrder() {
+ return BuildCustomStuffTask.ORDER;
+ }
+
+}
+Each release or post release task can implement one of the following interfaces
+ReleaserTask - marker interface for all release tasks
ReleaseReleaserTask - if a task is part of the main release process. That means that if it breaks, the whole release process should stop at once.
PostReleaseReleaserTask - marker interface for a post release task. If a post release task fails - the build continues but will be unstable.
SingleProjectReleaserTask - a release task for a single project.
ProjectPostReleaseReleaserTask - a post release task for a single project.
DryRunReleaseReleaserTask - a release task that should be executed during dry run mode.
TrainPostReleaseReleaserTask - a post release task that should be executed after the whole release train.
CompositeReleaserTask - a task that delegates work to other tasks.
In addition, your project can provide the following beans:
+CustomBomParser - if you need to perform some additional BOM parsing. E.g. Spring Cloud adds spring-boot and spring-cloud-build versions when parsing the BOM project.
CustomProjectDocumentationUpdater - if you need to perform some custom logic when updating the project’s documentation.
CustomGithubIssues - if you need to perform additional logic when dealing with Github issues.
To run the project you should create your main class preferably under the releaser package and extend the ReleaserCommandLineRunner class.
package releaser;
+
+import releaser.internal.options.Parser;
+import releaser.internal.spring.ExecutionResultHandler;
+import releaser.internal.spring.SpringReleaser;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ReleaserApplication extends ReleaserCommandLineRunner {
+
+ public ReleaserApplication(SpringReleaser releaser,
+ ExecutionResultHandler executionResultHandler, Parser parser) {
+ super(releaser, executionResultHandler, parser);
+ }
+
+ public static void main(String[] args) {
+ SpringApplication application = new SpringApplication(ReleaserApplication.class);
+ application.setWebApplicationType(WebApplicationType.NONE);
+ application.run(args);
+ }
+
+}
+You can also extend the way the projects and tasks are parsed, flows are executed and the result is analyzed together with the printed report. To do that you should implement the following interfaces as beans:
+SpringReleaser - performs the release, given the provided options
FlowRunner - knows how to execute a release and post release flow
ExecutionResultHandler - handles the result of the release
Members of the Spring Cloud Team typically use this tool as follows. They first -clone the releaser locally and build the jar manually
+Members of the Spring Cloud Team typically use this tool as follows. +They first clone the releaser locally and build the jar manually
--releaser.git.oauth-token=… or put it as an env variable in .bashrc
+You must set the value of the OAuth token.
+You can do it either via the command line --releaser.git.oauth-token=… or put it as an env variable in .bashrc
or .zshrc e.g. export RELEASER_GIT_OAUTH_TOKEN=…
.zshrc e.g. export RELEASER_GIT_OAUTH_TOKEN=…
$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
$ cd spring-cloud-sleuth
$ # example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser
+$ java -jar ~/repo/spring-cloud-release-tools/projects/spring-cloud/target/spring-cloud-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser
The application will start running from your working directory. Running this code
-follows the convention that you have the OAuth token environment variable set. It also assumes
-that you might have some custom configuration in config/releaser.yml file. This setting is optional - if
-you don’t have that file, nothing will happen.
The application will start running from your working directory.
+Running this code follows the convention that you have the OAuth token environment variable set.
+It also assumes that you might have some custom configuration in config/releaser.yml file.
+This setting is optional - if you don’t have that file, nothing will happen.
-For the meta release the startFrom or taskNames take into consideration
-the project names, not task names. E.g. you can start from spring-cloud-netflix project,
-or build only tasks with names spring-cloud-build,spring-cloud-sleuth.
+For the meta release the startFrom or taskNames take into consideration the project names, not task names. E.g. you can start from spring-cloud-netflix project, or build only tasks with names spring-cloud-build,spring-cloud-sleuth.
|
spring-cloud-build,spring-cloud-sleuthProject name to its version - overrides all versions retrieved from a release train repository like Spring Cloud Release.
+releaser.flow.default-enabled
+true
+Should the default flow of jobs be preserved. If set to {@code false} will not register any jobs as beans, and it will be up to you to set the whole configuration of jobs.
+
+
releaser.git.all-test-sample-urls
Project to urls mapping. For each project will clone the test project and will update its versions.
@@ -624,12 +842,12 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.documentation-branch
-gh-pages
+
Branch to check out for the documentation project.
releaser.git.documentation-url
-
+
URL to the documentation Git repository.
@@ -654,27 +872,27 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.release-train-bom-url
-
+
URL to a release train repository.
releaser.git.release-train-docs-branch
-master
+
Branch to check out for the release train docs.
releaser.git.release-train-docs-url
-
+
URL to the release train documentation.
releaser.git.release-train-wiki-page-prefix
-Spring-Cloud
+
Page prefix for the release train wiki. E.g. for [Spring-Cloud-Finchley-Release-Notes] it would be [Spring-Cloud].
releaser.git.release-train-wiki-url
-
+
URL to the release train wiki.
@@ -684,22 +902,22 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.spring-project-branch
-gh-pages
+
Branch to check out for the release train project.
releaser.git.spring-project-url
-
+
URL to the release train project page repository.
releaser.git.test-samples-branch
-master
+
Branch to check out for the test samples.
releaser.git.test-samples-project-url
-
+
URL to test samples.
@@ -764,7 +982,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.gradle.generate-release-train-docs-command
-echo 'TODO'
+./gradlew generateReleaseTrainDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}
Command to be executed to generate release train documentation.
@@ -779,7 +997,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.gradle.publish-docs-commands
-[echo 'TODO']
+[./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}]
Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
@@ -834,7 +1052,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.meta-release.git-org-url
-
+
The URL of the Git organization. We’ll append each project’s name to it.
@@ -843,19 +1061,34 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuthNames of projects to skip deployment for meta-release.
+releaser.meta-release.release-group-thread-count
+4
+Number of threads per release group. E.g. for thread count of 4 if there are 6 projects in a release group, 4 of them will be executed in parallel and 2 will wait for their turn.
+
+
+releaser.meta-release.release-group-timeout-in-minutes
+180
+Timeout in minutes during which we’re waiting for a single composite task per a project to be executed. That means that if set to e.g. 180 then a release process for a single project should take at most 180 minutes.
+
+
+releaser.meta-release.release-groups
+
+If provided, allows to provide groups of projects that can be ran in parallel. E.g. {@code --releaser.meta-release.release-groups[0]=projectA,projectB,projectC} {@code --releaser.meta-release.release-groups[1]=projectD,projectE} {@code --releaser.meta-release.release-groups[2]=projectF,projectG} The order is still provided by the list of versions passed to the releaser. Basing on that order, and this value we are able to build a flow with projects.
+
+
releaser.meta-release.release-train-dependency-names
All the names of dependencies that should be updated with the release train project version.
releaser.meta-release.release-train-project-name
-spring-cloud-release
+
Name of the release train project.
releaser.pom.bom-version-pattern
-^(spring-cloud-.*)\.version$
-The pattern to match a version property in a BOM.
+
+The pattern to match a version property in a BOM. Remember to catch the dependency name in a group. E.g. "^(spring-cloud-.*)\\.version$".
releaser.pom.branch
@@ -864,17 +1097,17 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.pom.ignored-pom-regex
-
+^.\.git/.$
List of regular expressions of ignored poms. Defaults to test projects and samples.
releaser.pom.pom-with-boot-starter-parent
-spring-cloud-starter-parent/pom.xml
+
Subfolder of the pom that contains the {@code spring-boot-starer-parent} dependency.
releaser.pom.this-train-bom
-spring-cloud-dependencies/pom.xml
+
Subfolder of the pom that contains the versions for the release train.
@@ -908,8 +1141,18 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuthIf set to {@code false} will not update Sagan.
+releaser.skip-post-release-tasks
+false
+If set to {@code true} will not run post release tasks.
+
+
+releaser.template.enabled
+false
+Should template generation be enabled.
+
+
releaser.template.template-folder
-cloud
+
Folder in which blog, email etc. templates are stored.
@@ -919,7 +1162,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.versions.bom-name
-spring-cloud
+
Name in the YAML from initilizr for BOM mappings.
@@ -937,8 +1180,8 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
You can pass the options either via system properties or via application arguments.
-Example for system properties: java -Dreleaser.pom.branch=Camden.SR6 -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar
-Example for application arguments: java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
+Example for system properties: java -Dreleaser.pom.branch=Camden.SR6 -jar target/releaser-spring-1.0.0.M1.jar
+Example for application arguments: java -jar target/releaser-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
@@ -950,11 +1193,10 @@ Example for application arguments: java -jar target/spring-cloud-release-t
-For the GA release to be successful, it’s important that if the build / deploy command
- run a script (e.g. scripts/foo.sh) then inside foo.sh if you call a Maven build ./mvnw clean install
- then remember to pass all arguments of the script there too. E.g. ./mvnw clean install ${@}. That’s because
- the releaser will pass any system properties to the build / deploy command, such as system properties
- with keys and we need them to be passed inside the command executed by the releaser.
+For the GA release to be successful, it’s important that if the build / deploy command run a script (e.g. scripts/foo.sh) then inside foo.sh if you call a Maven build ./mvnw clean install
+then remember to pass all arguments of the script there too.
+E.g. ./mvnw clean install ${@}.
+That’s because the releaser will pass any system properties to the build / deploy command, such as system properties with keys and we need them to be passed inside the command executed by the releaser.
@@ -965,14 +1207,13 @@ For the GA release to be successful, it’s important that if the buil
Keeping configuration in the project
-If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed
-to build the project and properly merge the docs) then you can put a file named e.g. releaser.yml under config
+
If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed to build the project and properly merge the docs) then you can put a file named e.g. releaser.yml under config
folder and run your application like this:
-$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/1.0.0.M1/spring-cloud-release-tools-spring-1.0.0.M1.jar -O ../spring-cloud-release-tools-spring-1.0.0.M1.jar
-$ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --spring.config.name=releaser
+$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/releaser-spring/1.0.0.M1/releaser-spring-1.0.0.M1.jar -O ../releaser-spring-1.0.0.M1.jar
+$ java -jar target/releaser-spring-1.0.0.M1.jar --spring.config.name=releaser
@@ -982,8 +1223,8 @@ $ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --spring.confi
-Notice that we’re downloading the jar to a parent folder, not to target. That’s because target get cleaned
-during the build process
+Notice that we’re downloading the jar to a parent folder, not to target.
+That’s because target get cleaned during the build process
@@ -995,8 +1236,7 @@ during the build process
-For the meta-releaser to work we assume that the path to the
-configuration file is always config/releaser.yml.
+For the meta-releaser to work we assume that the path to the configuration file is always config/releaser.yml.
@@ -1010,7 +1250,7 @@ If you would like to use another branch you can specify it using the relea
-$ java -jar spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
+$ java -jar releaser-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
@@ -1018,16 +1258,15 @@ If you would like to use another branch you can specify it using the relea
Using Environment Variables
In some cases it might be easier to specify environment variables instead of passing parameters to
-releaser. For example, you might want to use environment variables if you are going to be
-releasing multiple projects, this keeps you from having to specify the same parameters for
-each release
+releaser.
+For example, you might want to use environment variables if you are going to be releasing multiple projects, this keeps you from having to specify the same parameters for each release
$ export RELEASER_POM_BRANCH=Dalston.RELEASE
$ export RELEASER_GIT_OAUTH_TOKEN=...
-$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/1.0.0.M1/spring-cloud-release-tools-spring-1.0.0.M1.jar -O spring-cloud-release-tools-spring-1.0.0.M1.jar
-$ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.working-dir=/path/to/project/root
+$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/releaser-spring/1.0.0.M1/releaser-spring-1.0.0.M1.jar -O releaser-spring-1.0.0.M1.jar
+$ java -jar target/releaser-spring-1.0.0.M1.jar --releaser.working-dir=/path/to/project/root
@@ -1041,7 +1280,8 @@ $ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.wor
-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.
+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.
@@ -1049,12 +1289,14 @@ Whenever a release process is broken, Jenkins marks it with a red ball and break
Releasing a Single Project
-Let us assume that we are to release spring-cloud-build project. We need to do the following steps:
+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:
+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:
@@ -1068,7 +1310,10 @@ $ 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:
+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:
@@ -1104,35 +1349,38 @@ If you’re doing a e.g. M1 release, remember to not have any s
-
+
-
-
Pick the proper releaser project (for example, spring-cloud-build-releaser). The following image shows the settings for this example:
+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:
+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.
+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.
@@ -1145,7 +1393,8 @@ If you’re doing a e.g. M1 release, remember to not have any s
You are done!
-As a post action, do not forget to remove the branch. The following example shows how to do so:
+As a post action, do not forget to remove the branch.
+The following example shows how to do so:
@@ -1159,12 +1408,15 @@ $ git push origin --delete springCloudBuildRelease
Releasing a Release Train
-We call a release train a meta-release. In order to perform one, you need to:
+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:
+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:
@@ -1178,7 +1430,10 @@ $ 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:
+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:
@@ -1190,7 +1445,8 @@ $ git checkout jenkins-releaser-config
-
-
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:
+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:
@@ -1226,7 +1482,7 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
@@ -1238,7 +1494,7 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
@@ -1250,11 +1506,12 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
-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.
+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.
@@ -1459,10 +1716,11 @@ from the file menu.
-There are 2 different versions of language level used in Spring Cloud Sleuth. Java 1.7 is used for main sources and
-Java 1.8 is used for tests. When importing your project to an IDE please activate the ide Maven profile to turn on
-Java 1.8 for both main and test sources. Of course remember that you MUST NOT use Java 1.8 features in the main sources. If you do
-so your app will break during the Maven build.
+There are 2 different versions of language level used in Spring Cloud Sleuth.
+Java 1.7 is used for main sources and Java 1.8 is used for tests.
+When importing your project to an IDE please activate the ide Maven profile to turn on Java 1.8 for both main and test sources.
+Of course remember that you MUST NOT use Java 1.8 features in the main sources.
+If you do so your app will break during the Maven build.
diff --git a/reference/html/index.html b/reference/html/index.html
index 34d6e462..36f59dce 100644
--- a/reference/html/index.html
+++ b/reference/html/index.html
@@ -97,35 +97,16 @@ $(addBlockSwitches);
- Spring Cloud Release Tools
-- What does it do?
-
-
+- What does it do?
+- How can I extend it?
- What should I do first?
- How to run it (interactive mode)
- How to run it (automatic mode)
- How to run meta-release (automatic-mode)
- Project options
-- Examples
-
-
-- Releasing through Jenkins
-
-
-- FAQ
-
-
+- Examples
+- Releasing through Jenkins
+- FAQ
@@ -136,20 +117,20 @@ $(addBlockSwitches);
Spring Cloud Release Tools
-Spring Cloud projects reuse the same pattern of building and deploying the applications. That’s
-why this tool makes it easy to automate the release / dependency update process of our applications.
+Spring Cloud projects reuse the same pattern of building and deploying the applications.
+That’s why this tool makes it easy to automate the release / dependency update process of our applications.
What does it do?
Single project
-For a single project
+For a single project, by default if you opt in to all tasks
-
-
Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)
+Clones the BOM project and picks all versions
-
Modifies the project versions with values from a BOM (e.g. for Spring Cloud it’s Spring Cloud Release)
@@ -181,7 +162,7 @@ why this tool makes it easy to automate the release / dependency update process
Runs the deployment of the artifacts
-
-
Publishes the docs (to spring-cloud-static for non-snapshots, to gh-pages for snapshots)
+Publishes the docs (for Spring Cloud to spring-cloud-static for non-snapshots, to gh-pages for snapshots)
-
Reverts back to snapshots, bumps the version by a patch (1.0.1.RELEASE → 1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)
@@ -198,8 +179,7 @@ why this tool makes it easy to automate the release / dependency update process
-Starting with version that does Sagan integration, you MUST pass the OAuth token,
-otherwise the application will fail to start
+Starting with version that does Sagan integration, you MUST pass the OAuth token, otherwise the application will fail to start
@@ -231,7 +211,7 @@ otherwise the application will fail to start
For GA/ SR release will create an issue in start.spring.io under https://github.com/spring-io/start.spring.io/issues/
-
-
For GA/ SR release will update the links under https://github.com/spring-cloud/spring-cloud-static/tree/gh-pages/current
+For GA/ SR release will update the documentation links (for Spring Cloud https://github.com/spring-cloud/spring-cloud-static/tree/gh-pages/current)
-
Will update the release train project page (for Spring Cloud it will be https://github.com/spring-projects/spring-cloud)
@@ -241,6 +221,9 @@ otherwise the application will fail to start
Meta-release
+
+All the tasks are opt in, so if you do opt in for everything you’ll get:
+
-
@@ -283,19 +266,228 @@ otherwise the application will fail to start
-For the meta-releaser to work we assume that the path to the
-custom configuration file for each project is always config/releaser.yml.
+For the meta-releaser to work we assume that the path to the custom configuration file for each project is always config/releaser.yml.
+
+
+
+
+
+
+
+If you want to run some projects in parallel you have to set the releaser.meta-release.release-groups property to state which projects should be released in parallel. Example:
+
+
+
+
+
+
+releaser.meta-release.release-groups[0]=projectA,projectB,projectC
+
+
+
+If in the list of projects you have projectA,projectB,projectC,projectD,projectE, then projectA,projectB,projectC will be released in parallel and then projectD and projectE sequentially.
+
+
+
+
+How can I extend it?
+
+The project consists of the following main modules
+
+
+
+-
+
releaser-core - with the core logic for doing releases
+
+-
+
relaser-spring - with the Spring setup of tasks and a flow execution
+
+-
+
projects
+
+
+-
+
where each project has their configuration properties and additional tasks
+
+
+
+
+
+
+
+You can create your own project’s module and
+
+
+
+-
+
if you want to completely rewrite the flow of the release, just set releaser.flow.default-enabled to false and create the whole flow from scratch
+
+-
+
if you want to modify the current flow, you can add new tasks by just creating a bean of a given type that extends the ReleaserTask and set its order accordingly.
+
+
+
+
+Example of creating a new ReleaseReleaserTask called BuildCustomStuffTask:
+
+
+
+package releaser.my_project;
+
+//...
+
+import releaser.internal.Releaser;
+import releaser.internal.spring.Arguments;
+import releaser.internal.spring.ExecutionResult;
+import releaser.internal.tasks.ReleaseReleaserTask;
+
+@Component
+public class BuildCustomStuffTask implements ReleaseReleaserTask {
+
+ /**
+ * Order of this task. The higher value, the lower order.
+ */
+ public static final int ORDER = 45;
+
+ @Override
+ public String name() {
+ return "build_custom_stuff";
+ }
+
+ @Override
+ public String shortName() {
+ return "bcf";
+ }
+
+ @Override
+ public String header() {
+ return "BUILDING CUSTOM STUFF";
+ }
+
+ @Override
+ public String description() {
+ return "Builds custom stuff";
+ }
+
+ @Override
+ public ExecutionResult runTask(Arguments args) {
+ // do some custom stuff basing on the arguments
+ return ExecutionResult.success();
+ }
+
+ @Override
+ public int getOrder() {
+ return BuildCustomStuffTask.ORDER;
+ }
+
+}
+
+
+
+Each release or post release task can implement one of the following interfaces
+
+
+
+-
+
ReleaserTask - marker interface for all release tasks
+
+-
+
ReleaseReleaserTask - if a task is part of the main release process. That means that if it breaks, the whole release process should stop at once.
+
+-
+
PostReleaseReleaserTask - marker interface for a post release task. If a post release task fails - the build continues but will be unstable.
+
+-
+
SingleProjectReleaserTask - a release task for a single project.
+
+-
+
ProjectPostReleaseReleaserTask - a post release task for a single project.
+
+-
+
DryRunReleaseReleaserTask - a release task that should be executed during dry run mode.
+
+-
+
TrainPostReleaseReleaserTask - a post release task that should be executed after the whole release train.
+
+-
+
CompositeReleaserTask - a task that delegates work to other tasks.
+
+
+
+
+In addition, your project can provide the following beans:
+
+
+
+-
+
CustomBomParser - if you need to perform some additional BOM parsing. E.g. Spring Cloud adds spring-boot and spring-cloud-build versions when parsing the BOM project.
+
+-
+
CustomProjectDocumentationUpdater - if you need to perform some custom logic when updating the project’s documentation.
+
+-
+
CustomGithubIssues - if you need to perform additional logic when dealing with Github issues.
+
+
+
+
+To run the project you should create your main class preferably under the releaser package and extend the ReleaserCommandLineRunner class.
+
+
+
+package releaser;
+
+import releaser.internal.options.Parser;
+import releaser.internal.spring.ExecutionResultHandler;
+import releaser.internal.spring.SpringReleaser;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ReleaserApplication extends ReleaserCommandLineRunner {
+
+ public ReleaserApplication(SpringReleaser releaser,
+ ExecutionResultHandler executionResultHandler, Parser parser) {
+ super(releaser, executionResultHandler, parser);
+ }
+
+ public static void main(String[] args) {
+ SpringApplication application = new SpringApplication(ReleaserApplication.class);
+ application.setWebApplicationType(WebApplicationType.NONE);
+ application.run(args);
+ }
+
+}
+
+
+
+You can also extend the way the projects and tasks are parsed, flows are executed and the result is analyzed together with the printed report. To do that you should implement the following interfaces as beans:
+
+
+
+-
+
SpringReleaser - performs the release, given the provided options
+
+-
+
FlowRunner - knows how to execute a release and post release flow
+
+-
+
ExecutionResultHandler - handles the result of the release
+
+
What should I do first?
-Members of the Spring Cloud Team typically use this tool as follows. They first
-clone the releaser locally and build the jar manually
+Members of the Spring Cloud Team typically use this tool as follows.
+They first clone the releaser locally and build the jar manually
@@ -311,8 +503,8 @@ $ ./mvnw clean install
-You must set the value of the OAuth token. You can do it either via
-the command line --releaser.git.oauth-token=… or put it as an env variable in .bashrc
+You must set the value of the OAuth token.
+You can do it either via the command line --releaser.git.oauth-token=… or put it as an env variable in .bashrc
or .zshrc e.g. export RELEASER_GIT_OAUTH_TOKEN=…
@@ -329,14 +521,14 @@ or .zshrc e.g. export RELEASER_GIT_OAUTH_TOKEN=…
$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
$ cd spring-cloud-sleuth
$ # example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser
+$ java -jar ~/repo/spring-cloud-release-tools/projects/spring-cloud/target/spring-cloud-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser
The application will start running from your working directory. Running this code
-follows the convention that you have the OAuth token environment variable set. It also assumes
-that you might have some custom configuration in config/releaser.yml file. This setting is optional - if
-you don’t have that file, nothing will happen.
The application will start running from your working directory.
+Running this code follows the convention that you have the OAuth token environment variable set.
+It also assumes that you might have some custom configuration in config/releaser.yml file.
+This setting is optional - if you don’t have that file, nothing will happen.
-For the meta release the startFrom or taskNames take into consideration
-the project names, not task names. E.g. you can start from spring-cloud-netflix project,
-or build only tasks with names spring-cloud-build,spring-cloud-sleuth.
+For the meta release the startFrom or taskNames take into consideration the project names, not task names. E.g. you can start from spring-cloud-netflix project, or build only tasks with names spring-cloud-build,spring-cloud-sleuth.
|
spring-cloud-build,spring-cloud-sleuthProject name to its version - overrides all versions retrieved from a release train repository like Spring Cloud Release.
+releaser.flow.default-enabled
+true
+Should the default flow of jobs be preserved. If set to {@code false} will not register any jobs as beans, and it will be up to you to set the whole configuration of jobs.
+
+
releaser.git.all-test-sample-urls
Project to urls mapping. For each project will clone the test project and will update its versions.
@@ -614,12 +812,12 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.documentation-branch
-gh-pages
+
Branch to check out for the documentation project.
releaser.git.documentation-url
-
+
URL to the documentation Git repository.
@@ -644,27 +842,27 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.release-train-bom-url
-
+
URL to a release train repository.
releaser.git.release-train-docs-branch
-master
+
Branch to check out for the release train docs.
releaser.git.release-train-docs-url
-
+
URL to the release train documentation.
releaser.git.release-train-wiki-page-prefix
-Spring-Cloud
+
Page prefix for the release train wiki. E.g. for [Spring-Cloud-Finchley-Release-Notes] it would be [Spring-Cloud].
releaser.git.release-train-wiki-url
-
+
URL to the release train wiki.
@@ -674,22 +872,22 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.spring-project-branch
-gh-pages
+
Branch to check out for the release train project.
releaser.git.spring-project-url
-
+
URL to the release train project page repository.
releaser.git.test-samples-branch
-master
+
Branch to check out for the test samples.
releaser.git.test-samples-project-url
-
+
URL to test samples.
@@ -754,7 +952,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.gradle.generate-release-train-docs-command
-echo 'TODO'
+./gradlew generateReleaseTrainDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}
Command to be executed to generate release train documentation.
@@ -769,7 +967,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.gradle.publish-docs-commands
-[echo 'TODO']
+[./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}]
Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
@@ -824,7 +1022,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.meta-release.git-org-url
-
+
The URL of the Git organization. We’ll append each project’s name to it.
@@ -833,19 +1031,34 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuthNames of projects to skip deployment for meta-release.
+releaser.meta-release.release-group-thread-count
+4
+Number of threads per release group. E.g. for thread count of 4 if there are 6 projects in a release group, 4 of them will be executed in parallel and 2 will wait for their turn.
+
+
+releaser.meta-release.release-group-timeout-in-minutes
+180
+Timeout in minutes during which we’re waiting for a single composite task per a project to be executed. That means that if set to e.g. 180 then a release process for a single project should take at most 180 minutes.
+
+
+releaser.meta-release.release-groups
+
+If provided, allows to provide groups of projects that can be ran in parallel. E.g. {@code --releaser.meta-release.release-groups[0]=projectA,projectB,projectC} {@code --releaser.meta-release.release-groups[1]=projectD,projectE} {@code --releaser.meta-release.release-groups[2]=projectF,projectG} The order is still provided by the list of versions passed to the releaser. Basing on that order, and this value we are able to build a flow with projects.
+
+
releaser.meta-release.release-train-dependency-names
All the names of dependencies that should be updated with the release train project version.
releaser.meta-release.release-train-project-name
-spring-cloud-release
+
Name of the release train project.
releaser.pom.bom-version-pattern
-^(spring-cloud-.*)\.version$
-The pattern to match a version property in a BOM.
+
+The pattern to match a version property in a BOM. Remember to catch the dependency name in a group. E.g. "^(spring-cloud-.*)\\.version$".
releaser.pom.branch
@@ -854,17 +1067,17 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.pom.ignored-pom-regex
-
+^.\.git/.$
List of regular expressions of ignored poms. Defaults to test projects and samples.
releaser.pom.pom-with-boot-starter-parent
-spring-cloud-starter-parent/pom.xml
+
Subfolder of the pom that contains the {@code spring-boot-starer-parent} dependency.
releaser.pom.this-train-bom
-spring-cloud-dependencies/pom.xml
+
Subfolder of the pom that contains the versions for the release train.
@@ -898,8 +1111,18 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuthIf set to {@code false} will not update Sagan.
+releaser.skip-post-release-tasks
+false
+If set to {@code true} will not run post release tasks.
+
+
+releaser.template.enabled
+false
+Should template generation be enabled.
+
+
releaser.template.template-folder
-cloud
+
Folder in which blog, email etc. templates are stored.
@@ -909,7 +1132,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.versions.bom-name
-spring-cloud
+
Name in the YAML from initilizr for BOM mappings.
@@ -927,8 +1150,8 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
You can pass the options either via system properties or via application arguments.
-Example for system properties: java -Dreleaser.pom.branch=Camden.SR6 -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar
-Example for application arguments: java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
+Example for system properties: java -Dreleaser.pom.branch=Camden.SR6 -jar target/releaser-spring-1.0.0.M1.jar
+Example for application arguments: java -jar target/releaser-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
@@ -940,11 +1163,10 @@ Example for application arguments: java -jar target/spring-cloud-release-t
-For the GA release to be successful, it’s important that if the build / deploy command
- run a script (e.g. scripts/foo.sh) then inside foo.sh if you call a Maven build ./mvnw clean install
- then remember to pass all arguments of the script there too. E.g. ./mvnw clean install ${@}. That’s because
- the releaser will pass any system properties to the build / deploy command, such as system properties
- with keys and we need them to be passed inside the command executed by the releaser.
+For the GA release to be successful, it’s important that if the build / deploy command run a script (e.g. scripts/foo.sh) then inside foo.sh if you call a Maven build ./mvnw clean install
+then remember to pass all arguments of the script there too.
+E.g. ./mvnw clean install ${@}.
+That’s because the releaser will pass any system properties to the build / deploy command, such as system properties with keys and we need them to be passed inside the command executed by the releaser.
@@ -955,14 +1177,13 @@ For the GA release to be successful, it’s important that if the buil
Keeping configuration in the project
-If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed
-to build the project and properly merge the docs) then you can put a file named e.g. releaser.yml under config
+
If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed to build the project and properly merge the docs) then you can put a file named e.g. releaser.yml under config
folder and run your application like this:
-$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/1.0.0.M1/spring-cloud-release-tools-spring-1.0.0.M1.jar -O ../spring-cloud-release-tools-spring-1.0.0.M1.jar
-$ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --spring.config.name=releaser
+$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/releaser-spring/1.0.0.M1/releaser-spring-1.0.0.M1.jar -O ../releaser-spring-1.0.0.M1.jar
+$ java -jar target/releaser-spring-1.0.0.M1.jar --spring.config.name=releaser
@@ -972,8 +1193,8 @@ $ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --spring.confi
-Notice that we’re downloading the jar to a parent folder, not to target. That’s because target get cleaned
-during the build process
+Notice that we’re downloading the jar to a parent folder, not to target.
+That’s because target get cleaned during the build process
@@ -985,8 +1206,7 @@ during the build process
-For the meta-releaser to work we assume that the path to the
-configuration file is always config/releaser.yml.
+For the meta-releaser to work we assume that the path to the configuration file is always config/releaser.yml.
@@ -1000,7 +1220,7 @@ If you would like to use another branch you can specify it using the relea
-$ java -jar spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
+$ java -jar releaser-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
@@ -1008,16 +1228,15 @@ If you would like to use another branch you can specify it using the relea
Using Environment Variables
In some cases it might be easier to specify environment variables instead of passing parameters to
-releaser. For example, you might want to use environment variables if you are going to be
-releasing multiple projects, this keeps you from having to specify the same parameters for
-each release
+releaser.
+For example, you might want to use environment variables if you are going to be releasing multiple projects, this keeps you from having to specify the same parameters for each release
$ export RELEASER_POM_BRANCH=Dalston.RELEASE
$ export RELEASER_GIT_OAUTH_TOKEN=...
-$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/1.0.0.M1/spring-cloud-release-tools-spring-1.0.0.M1.jar -O spring-cloud-release-tools-spring-1.0.0.M1.jar
-$ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.working-dir=/path/to/project/root
+$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/releaser-spring/1.0.0.M1/releaser-spring-1.0.0.M1.jar -O releaser-spring-1.0.0.M1.jar
+$ java -jar target/releaser-spring-1.0.0.M1.jar --releaser.working-dir=/path/to/project/root
@@ -1031,7 +1250,8 @@ $ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.wor
-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.
+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.
@@ -1039,12 +1259,14 @@ Whenever a release process is broken, Jenkins marks it with a red ball and break
Releasing a Single Project
-Let us assume that we are to release spring-cloud-build project. We need to do the following steps:
+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:
+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:
@@ -1058,7 +1280,10 @@ $ 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:
+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:
@@ -1094,35 +1319,38 @@ If you’re doing a e.g. M1 release, remember to not have any s
-
+
-
-
Pick the proper releaser project (for example, spring-cloud-build-releaser). The following image shows the settings for this example:
+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:
+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.
+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.
@@ -1135,7 +1363,8 @@ If you’re doing a e.g. M1 release, remember to not have any s
You are done!
-As a post action, do not forget to remove the branch. The following example shows how to do so:
+As a post action, do not forget to remove the branch.
+The following example shows how to do so:
@@ -1149,12 +1378,15 @@ $ git push origin --delete springCloudBuildRelease
Releasing a Release Train
-We call a release train a meta-release. In order to perform one, you need to:
+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:
+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:
@@ -1168,7 +1400,10 @@ $ 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:
+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:
@@ -1180,7 +1415,8 @@ $ git checkout jenkins-releaser-config
-
-
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:
+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:
@@ -1216,7 +1452,7 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
@@ -1228,7 +1464,7 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
@@ -1240,11 +1476,12 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
-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.
+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.
diff --git a/reference/html/spring-cloud-release-tools.html b/reference/html/spring-cloud-release-tools.html
index 34d6e462..36f59dce 100644
--- a/reference/html/spring-cloud-release-tools.html
+++ b/reference/html/spring-cloud-release-tools.html
@@ -97,35 +97,16 @@ $(addBlockSwitches);
- Spring Cloud Release Tools
-- What does it do?
-
-
+- What does it do?
+- How can I extend it?
- What should I do first?
- How to run it (interactive mode)
- How to run it (automatic mode)
- How to run meta-release (automatic-mode)
- Project options
-- Examples
-
-
-- Releasing through Jenkins
-
-
-- FAQ
-
-
+- Examples
+- Releasing through Jenkins
+- FAQ
@@ -136,20 +117,20 @@ $(addBlockSwitches);
Spring Cloud Release Tools
-Spring Cloud projects reuse the same pattern of building and deploying the applications. That’s
-why this tool makes it easy to automate the release / dependency update process of our applications.
+Spring Cloud projects reuse the same pattern of building and deploying the applications.
+That’s why this tool makes it easy to automate the release / dependency update process of our applications.
What does it do?
Single project
-For a single project
+For a single project, by default if you opt in to all tasks
-
-
Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)
+Clones the BOM project and picks all versions
-
Modifies the project versions with values from a BOM (e.g. for Spring Cloud it’s Spring Cloud Release)
@@ -181,7 +162,7 @@ why this tool makes it easy to automate the release / dependency update process
Runs the deployment of the artifacts
-
-
Publishes the docs (to spring-cloud-static for non-snapshots, to gh-pages for snapshots)
+Publishes the docs (for Spring Cloud to spring-cloud-static for non-snapshots, to gh-pages for snapshots)
-
Reverts back to snapshots, bumps the version by a patch (1.0.1.RELEASE → 1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)
@@ -198,8 +179,7 @@ why this tool makes it easy to automate the release / dependency update process
-Starting with version that does Sagan integration, you MUST pass the OAuth token,
-otherwise the application will fail to start
+Starting with version that does Sagan integration, you MUST pass the OAuth token, otherwise the application will fail to start
@@ -231,7 +211,7 @@ otherwise the application will fail to start
For GA/ SR release will create an issue in start.spring.io under https://github.com/spring-io/start.spring.io/issues/
-
-
For GA/ SR release will update the links under https://github.com/spring-cloud/spring-cloud-static/tree/gh-pages/current
+For GA/ SR release will update the documentation links (for Spring Cloud https://github.com/spring-cloud/spring-cloud-static/tree/gh-pages/current)
-
Will update the release train project page (for Spring Cloud it will be https://github.com/spring-projects/spring-cloud)
@@ -241,6 +221,9 @@ otherwise the application will fail to start
Meta-release
+
+All the tasks are opt in, so if you do opt in for everything you’ll get:
+
-
@@ -283,19 +266,228 @@ otherwise the application will fail to start
-For the meta-releaser to work we assume that the path to the
-custom configuration file for each project is always config/releaser.yml.
+For the meta-releaser to work we assume that the path to the custom configuration file for each project is always config/releaser.yml.
+
+
+
+
+
+
+
+If you want to run some projects in parallel you have to set the releaser.meta-release.release-groups property to state which projects should be released in parallel. Example:
+
+
+
+
+
+
+releaser.meta-release.release-groups[0]=projectA,projectB,projectC
+
+
+
+If in the list of projects you have projectA,projectB,projectC,projectD,projectE, then projectA,projectB,projectC will be released in parallel and then projectD and projectE sequentially.
+
+
+
+
+How can I extend it?
+
+The project consists of the following main modules
+
+
+
+-
+
releaser-core - with the core logic for doing releases
+
+-
+
relaser-spring - with the Spring setup of tasks and a flow execution
+
+-
+
projects
+
+
+-
+
where each project has their configuration properties and additional tasks
+
+
+
+
+
+
+
+You can create your own project’s module and
+
+
+
+-
+
if you want to completely rewrite the flow of the release, just set releaser.flow.default-enabled to false and create the whole flow from scratch
+
+-
+
if you want to modify the current flow, you can add new tasks by just creating a bean of a given type that extends the ReleaserTask and set its order accordingly.
+
+
+
+
+Example of creating a new ReleaseReleaserTask called BuildCustomStuffTask:
+
+
+
+package releaser.my_project;
+
+//...
+
+import releaser.internal.Releaser;
+import releaser.internal.spring.Arguments;
+import releaser.internal.spring.ExecutionResult;
+import releaser.internal.tasks.ReleaseReleaserTask;
+
+@Component
+public class BuildCustomStuffTask implements ReleaseReleaserTask {
+
+ /**
+ * Order of this task. The higher value, the lower order.
+ */
+ public static final int ORDER = 45;
+
+ @Override
+ public String name() {
+ return "build_custom_stuff";
+ }
+
+ @Override
+ public String shortName() {
+ return "bcf";
+ }
+
+ @Override
+ public String header() {
+ return "BUILDING CUSTOM STUFF";
+ }
+
+ @Override
+ public String description() {
+ return "Builds custom stuff";
+ }
+
+ @Override
+ public ExecutionResult runTask(Arguments args) {
+ // do some custom stuff basing on the arguments
+ return ExecutionResult.success();
+ }
+
+ @Override
+ public int getOrder() {
+ return BuildCustomStuffTask.ORDER;
+ }
+
+}
+
+
+
+Each release or post release task can implement one of the following interfaces
+
+
+
+-
+
ReleaserTask - marker interface for all release tasks
+
+-
+
ReleaseReleaserTask - if a task is part of the main release process. That means that if it breaks, the whole release process should stop at once.
+
+-
+
PostReleaseReleaserTask - marker interface for a post release task. If a post release task fails - the build continues but will be unstable.
+
+-
+
SingleProjectReleaserTask - a release task for a single project.
+
+-
+
ProjectPostReleaseReleaserTask - a post release task for a single project.
+
+-
+
DryRunReleaseReleaserTask - a release task that should be executed during dry run mode.
+
+-
+
TrainPostReleaseReleaserTask - a post release task that should be executed after the whole release train.
+
+-
+
CompositeReleaserTask - a task that delegates work to other tasks.
+
+
+
+
+In addition, your project can provide the following beans:
+
+
+
+-
+
CustomBomParser - if you need to perform some additional BOM parsing. E.g. Spring Cloud adds spring-boot and spring-cloud-build versions when parsing the BOM project.
+
+-
+
CustomProjectDocumentationUpdater - if you need to perform some custom logic when updating the project’s documentation.
+
+-
+
CustomGithubIssues - if you need to perform additional logic when dealing with Github issues.
+
+
+
+
+To run the project you should create your main class preferably under the releaser package and extend the ReleaserCommandLineRunner class.
+
+
+
+package releaser;
+
+import releaser.internal.options.Parser;
+import releaser.internal.spring.ExecutionResultHandler;
+import releaser.internal.spring.SpringReleaser;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.WebApplicationType;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class ReleaserApplication extends ReleaserCommandLineRunner {
+
+ public ReleaserApplication(SpringReleaser releaser,
+ ExecutionResultHandler executionResultHandler, Parser parser) {
+ super(releaser, executionResultHandler, parser);
+ }
+
+ public static void main(String[] args) {
+ SpringApplication application = new SpringApplication(ReleaserApplication.class);
+ application.setWebApplicationType(WebApplicationType.NONE);
+ application.run(args);
+ }
+
+}
+
+
+
+You can also extend the way the projects and tasks are parsed, flows are executed and the result is analyzed together with the printed report. To do that you should implement the following interfaces as beans:
+
+
+
+-
+
SpringReleaser - performs the release, given the provided options
+
+-
+
FlowRunner - knows how to execute a release and post release flow
+
+-
+
ExecutionResultHandler - handles the result of the release
+
+
What should I do first?
-Members of the Spring Cloud Team typically use this tool as follows. They first
-clone the releaser locally and build the jar manually
+Members of the Spring Cloud Team typically use this tool as follows.
+They first clone the releaser locally and build the jar manually
@@ -311,8 +503,8 @@ $ ./mvnw clean install
-You must set the value of the OAuth token. You can do it either via
-the command line --releaser.git.oauth-token=… or put it as an env variable in .bashrc
+You must set the value of the OAuth token.
+You can do it either via the command line --releaser.git.oauth-token=… or put it as an env variable in .bashrc
or .zshrc e.g. export RELEASER_GIT_OAUTH_TOKEN=…
@@ -329,14 +521,14 @@ or .zshrc e.g. export RELEASER_GIT_OAUTH_TOKEN=…
$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
$ cd spring-cloud-sleuth
$ # example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser
+$ java -jar ~/repo/spring-cloud-release-tools/projects/spring-cloud/target/spring-cloud-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser
-The application will start running from your working directory. Running this code
-follows the convention that you have the OAuth token environment variable set. It also assumes
-that you might have some custom configuration in config/releaser.yml file. This setting is optional - if
-you don’t have that file, nothing will happen.
+The application will start running from your working directory.
+Running this code follows the convention that you have the OAuth token environment variable set.
+It also assumes that you might have some custom configuration in config/releaser.yml file.
+This setting is optional - if you don’t have that file, nothing will happen.
@@ -378,8 +570,10 @@ You can press 'q' to quit
-Just pick a number and continue! Pick either a full release or single steps. You can also pick
-ranges or multiple steps. You can also provide the range only with the starting step
+
Just pick a number and continue!
+Pick either a full release or single steps.
+You can also pick ranges or multiple steps.
+You can also provide the range only with the starting step
- that you will execute all steps starting from the given one.
@@ -406,7 +600,7 @@ flag.
$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
$ cd spring-cloud-sleuth
$ # example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -h
+$ java -jar ~/repo/spring-cloud-release-tools/releaser-spring/target/releaser-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -h
@@ -469,9 +663,11 @@ java -jar releaser.jar -r o-p
-The Releaser can use two sets of options. The configuration options like releaser.pom.branch
-and the task switches. For the tasks you can use either the full names or short switches. For example
- providing range of tasks via switches o-p is equivalent to full name docs-push.
+The Releaser can use two sets of options.
+The configuration options like releaser.pom.branch
+and the task switches.
+For the tasks you can use either the full names or short switches.
+For example providing range of tasks via switches o-p is equivalent to full name docs-push.
A couple of examples:
@@ -482,37 +678,37 @@ and the task switches. For the tasks you can use either the full names or short
$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
$ cd spring-cloud-sleuth
$ # example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --full-release
+$ java -jar ~/repo/spring-cloud-release-tools/releaser-spring/target/releaser-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --full-release
Doing the full release in non interactive mode (automatic release)
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --full-release --interactive=false
+$ java -jar ~/repo/spring-cloud-release-tools/releaser-spring/target/releaser-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --full-release --interactive=false
Updating pom, closing milestone & createTemplates in interactive mode
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -u -m -t
+$ java -jar ~/repo/spring-cloud-release-tools/releaser-spring/target/releaser-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -u -m -t
Running all tasks starting from 'push' (automatic)
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -a push -i=false
+$ java -jar ~/repo/spring-cloud-release-tools/releaser-spring/target/releaser-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -a push -i=false
Running tasks from 'docs' (inclusive) to 'push' (inclusive) (automatic)
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -r d-p -i=false
+$ java -jar ~/repo/spring-cloud-release-tools/releaser-spring/target/releaser-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -r d-p -i=false
Running single task 'closeMilestone' (automatic)
-$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --closeMilestone -i=false
+$ java -jar ~/repo/spring-cloud-release-tools/releaser-spring/target/releaser-spring-1.0.0.BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --closeMilestone -i=false
@@ -520,12 +716,11 @@ $ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/
How to run meta-release (automatic-mode)
All you have to do is run the jar with the releaser and pass the
--x=true option to turn on meta-release and a list of fixed versions
-in the `--"releaser.fixed-versions[project-name]=project-version" format
+-x=true option to turn on meta-release and a list of fixed versions in the `--"releaser.fixed-versions[project-name]=project-version" format
-$ java -jar spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-1.0.0.BUILD-SNAPSHOT.jar --spring.config.name=releaser -x=true --"releaser.fixed-versions[spring-cloud-sleuth]=2.0.1.BUILD-SNAPSHOT"
+$ java -jar projects/spring-cloud/target/spring-cloud-1.0.0.BUILD-SNAPSHOT.jar --spring.config.name=releaser -x=true --"releaser.fixed-versions[spring-cloud-sleuth]=2.0.1.BUILD-SNAPSHOT"
@@ -535,9 +730,7 @@ in the `--"releaser.fixed-versions[project-name]=project-version" format
-For the meta release the startFrom or taskNames take into consideration
-the project names, not task names. E.g. you can start from spring-cloud-netflix project,
-or build only tasks with names spring-cloud-build,spring-cloud-sleuth.
+For the meta release the startFrom or taskNames take into consideration the project names, not task names. E.g. you can start from spring-cloud-netflix project, or build only tasks with names spring-cloud-build,spring-cloud-sleuth.
@@ -603,6 +796,11 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuthProject name to its version - overrides all versions retrieved from a release train repository like Spring Cloud Release.
+releaser.flow.default-enabled
+true
+Should the default flow of jobs be preserved. If set to {@code false} will not register any jobs as beans, and it will be up to you to set the whole configuration of jobs.
+
+
releaser.git.all-test-sample-urls
Project to urls mapping. For each project will clone the test project and will update its versions.
@@ -614,12 +812,12 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.documentation-branch
-gh-pages
+
Branch to check out for the documentation project.
releaser.git.documentation-url
-
+
URL to the documentation Git repository.
@@ -644,27 +842,27 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.release-train-bom-url
-
+
URL to a release train repository.
releaser.git.release-train-docs-branch
-master
+
Branch to check out for the release train docs.
releaser.git.release-train-docs-url
-
+
URL to the release train documentation.
releaser.git.release-train-wiki-page-prefix
-Spring-Cloud
+
Page prefix for the release train wiki. E.g. for [Spring-Cloud-Finchley-Release-Notes] it would be [Spring-Cloud].
releaser.git.release-train-wiki-url
-
+
URL to the release train wiki.
@@ -674,22 +872,22 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.git.spring-project-branch
-gh-pages
+
Branch to check out for the release train project.
releaser.git.spring-project-url
-
+
URL to the release train project page repository.
releaser.git.test-samples-branch
-master
+
Branch to check out for the test samples.
releaser.git.test-samples-project-url
-
+
URL to test samples.
@@ -754,7 +952,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.gradle.generate-release-train-docs-command
-echo 'TODO'
+./gradlew generateReleaseTrainDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}
Command to be executed to generate release train documentation.
@@ -769,7 +967,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.gradle.publish-docs-commands
-[echo 'TODO']
+[./gradlew publishDocs --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}]
Command to be executed to publish documentation. If present "{{version}}" will be replaced by the provided version.
@@ -824,7 +1022,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.meta-release.git-org-url
-
+
The URL of the Git organization. We’ll append each project’s name to it.
@@ -833,19 +1031,34 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuthNames of projects to skip deployment for meta-release.
+releaser.meta-release.release-group-thread-count
+4
+Number of threads per release group. E.g. for thread count of 4 if there are 6 projects in a release group, 4 of them will be executed in parallel and 2 will wait for their turn.
+
+
+releaser.meta-release.release-group-timeout-in-minutes
+180
+Timeout in minutes during which we’re waiting for a single composite task per a project to be executed. That means that if set to e.g. 180 then a release process for a single project should take at most 180 minutes.
+
+
+releaser.meta-release.release-groups
+
+If provided, allows to provide groups of projects that can be ran in parallel. E.g. {@code --releaser.meta-release.release-groups[0]=projectA,projectB,projectC} {@code --releaser.meta-release.release-groups[1]=projectD,projectE} {@code --releaser.meta-release.release-groups[2]=projectF,projectG} The order is still provided by the list of versions passed to the releaser. Basing on that order, and this value we are able to build a flow with projects.
+
+
releaser.meta-release.release-train-dependency-names
All the names of dependencies that should be updated with the release train project version.
releaser.meta-release.release-train-project-name
-spring-cloud-release
+
Name of the release train project.
releaser.pom.bom-version-pattern
-^(spring-cloud-.*)\.version$
-The pattern to match a version property in a BOM.
+
+The pattern to match a version property in a BOM. Remember to catch the dependency name in a group. E.g. "^(spring-cloud-.*)\\.version$".
releaser.pom.branch
@@ -854,17 +1067,17 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.pom.ignored-pom-regex
-
+^.\.git/.$
List of regular expressions of ignored poms. Defaults to test projects and samples.
releaser.pom.pom-with-boot-starter-parent
-spring-cloud-starter-parent/pom.xml
+
Subfolder of the pom that contains the {@code spring-boot-starer-parent} dependency.
releaser.pom.this-train-bom
-spring-cloud-dependencies/pom.xml
+
Subfolder of the pom that contains the versions for the release train.
@@ -898,8 +1111,18 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuthIf set to {@code false} will not update Sagan.
+releaser.skip-post-release-tasks
+false
+If set to {@code true} will not run post release tasks.
+
+
+releaser.template.enabled
+false
+Should template generation be enabled.
+
+
releaser.template.template-folder
-cloud
+
Folder in which blog, email etc. templates are stored.
@@ -909,7 +1132,7 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
releaser.versions.bom-name
-spring-cloud
+
Name in the YAML from initilizr for BOM mappings.
@@ -927,8 +1150,8 @@ or build only tasks with names spring-cloud-build,spring-cloud-sleuth
You can pass the options either via system properties or via application arguments.
-Example for system properties: java -Dreleaser.pom.branch=Camden.SR6 -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar
-Example for application arguments: java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
+Example for system properties: java -Dreleaser.pom.branch=Camden.SR6 -jar target/releaser-spring-1.0.0.M1.jar
+Example for application arguments: java -jar target/releaser-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
@@ -940,11 +1163,10 @@ Example for application arguments: java -jar target/spring-cloud-release-t
-For the GA release to be successful, it’s important that if the build / deploy command
- run a script (e.g. scripts/foo.sh) then inside foo.sh if you call a Maven build ./mvnw clean install
- then remember to pass all arguments of the script there too. E.g. ./mvnw clean install ${@}. That’s because
- the releaser will pass any system properties to the build / deploy command, such as system properties
- with keys and we need them to be passed inside the command executed by the releaser.
+For the GA release to be successful, it’s important that if the build / deploy command run a script (e.g. scripts/foo.sh) then inside foo.sh if you call a Maven build ./mvnw clean install
+then remember to pass all arguments of the script there too.
+E.g. ./mvnw clean install ${@}.
+That’s because the releaser will pass any system properties to the build / deploy command, such as system properties with keys and we need them to be passed inside the command executed by the releaser.
@@ -955,14 +1177,13 @@ For the GA release to be successful, it’s important that if the buil
Keeping configuration in the project
-If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed
-to build the project and properly merge the docs) then you can put a file named e.g. releaser.yml under config
+
If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed to build the project and properly merge the docs) then you can put a file named e.g. releaser.yml under config
folder and run your application like this:
-$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/1.0.0.M1/spring-cloud-release-tools-spring-1.0.0.M1.jar -O ../spring-cloud-release-tools-spring-1.0.0.M1.jar
-$ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --spring.config.name=releaser
+$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/releaser-spring/1.0.0.M1/releaser-spring-1.0.0.M1.jar -O ../releaser-spring-1.0.0.M1.jar
+$ java -jar target/releaser-spring-1.0.0.M1.jar --spring.config.name=releaser
@@ -972,8 +1193,8 @@ $ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --spring.confi
-Notice that we’re downloading the jar to a parent folder, not to target. That’s because target get cleaned
-during the build process
+Notice that we’re downloading the jar to a parent folder, not to target.
+That’s because target get cleaned during the build process
@@ -985,8 +1206,7 @@ during the build process
-For the meta-releaser to work we assume that the path to the
-configuration file is always config/releaser.yml.
+For the meta-releaser to work we assume that the path to the configuration file is always config/releaser.yml.
@@ -1000,7 +1220,7 @@ If you would like to use another branch you can specify it using the relea
-$ java -jar spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
+$ java -jar releaser-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
@@ -1008,16 +1228,15 @@ If you would like to use another branch you can specify it using the relea
Using Environment Variables
In some cases it might be easier to specify environment variables instead of passing parameters to
-releaser. For example, you might want to use environment variables if you are going to be
-releasing multiple projects, this keeps you from having to specify the same parameters for
-each release
+releaser.
+For example, you might want to use environment variables if you are going to be releasing multiple projects, this keeps you from having to specify the same parameters for each release
$ export RELEASER_POM_BRANCH=Dalston.RELEASE
$ export RELEASER_GIT_OAUTH_TOKEN=...
-$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/1.0.0.M1/spring-cloud-release-tools-spring-1.0.0.M1.jar -O spring-cloud-release-tools-spring-1.0.0.M1.jar
-$ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.working-dir=/path/to/project/root
+$ wget https://repo.spring.io/libs-milestone/org/springframework/cloud/internal/releaser-spring/1.0.0.M1/releaser-spring-1.0.0.M1.jar -O releaser-spring-1.0.0.M1.jar
+$ java -jar target/releaser-spring-1.0.0.M1.jar --releaser.working-dir=/path/to/project/root
@@ -1031,7 +1250,8 @@ $ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.wor
-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.
+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.
@@ -1039,12 +1259,14 @@ Whenever a release process is broken, Jenkins marks it with a red ball and break
Releasing a Single Project
-Let us assume that we are to release spring-cloud-build project. We need to do the following steps:
+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:
+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:
@@ -1058,7 +1280,10 @@ $ 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:
+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:
@@ -1094,35 +1319,38 @@ If you’re doing a e.g. M1 release, remember to not have any s
-
+
-
-
Pick the proper releaser project (for example, spring-cloud-build-releaser). The following image shows the settings for this example:
+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:
+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.
+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.
@@ -1135,7 +1363,8 @@ If you’re doing a e.g. M1 release, remember to not have any s
You are done!
-As a post action, do not forget to remove the branch. The following example shows how to do so:
+As a post action, do not forget to remove the branch.
+The following example shows how to do so:
@@ -1149,12 +1378,15 @@ $ git push origin --delete springCloudBuildRelease
Releasing a Release Train
-We call a release train a meta-release. In order to perform one, you need to:
+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:
+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:
@@ -1168,7 +1400,10 @@ $ 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:
+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:
@@ -1180,7 +1415,8 @@ $ git checkout jenkins-releaser-config
-
-
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:
+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:
@@ -1216,7 +1452,7 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
@@ -1228,7 +1464,7 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
@@ -1240,11 +1476,12 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2
-
+
-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.
+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.