'+
"+
'+
"+
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.
Modifies the project versions with values from SC-Release
Performs the build and checks if the docs modules have properly created the documentation
docs module there’s an unresolved tag in any HTML filespring-cloud-static for non-snapshots, to gh-pages for snapshots)1.0.1.RELEASE → 1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)v1.0.1.RELEASE) (ONLY FOR NON-SNAPSHOT VERSIONS)target/email.txt (ONLY FOR NON-SNAPSHOT VERSIONS)target/blog.md (ONLY FOR NON-SNAPSHOT VERSIONS)target/tweet.txt (ONLY FOR NON-SNAPSHOT VERSIONS)Members of the Spring Cloud Team typically use this tool as follows. They first +clone the releaser locally and build the jar manually
$ git clone git@github.com:spring-cloud/spring-cloud-release-tools.git
+$ cd spring-cloud-release-tools
+$ ./mvnw clean installGo to your project (e.g. Spring Cloud Sleuth)
$ 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
The application will start running from your working directory.
![]() | Tip |
|---|---|
It is important that you clone the repository you are going to release using SSH in order for the
+ |
You will see text similar to this one
=== WHAT DO YOU WANT TO DO? === + +0) Perform a full release of this project without interruptions +1) Perform a full release of this project in a verbose mode (you'll be asked about skipping steps) +2) Update poms with versions from Spring Cloud Release +3) Build the project +4) Commit, tag and push the tag +5) Deploy the artifacts to Artifactory +6) Publish the docs +7) Go back to snapshots and bump originalVersion by patch +8) Push the commits +9) Close the milestone at Github +10) Create email / tweet etc. templates + + +You can press 'q' to quit
Just pick a number and continue! Pick either a full release or single steps.
![]() | Tip |
|---|---|
Read before picking a number cause it might have changed between tool releases ;) |
releaser.fixed-versions - A String to String mapping of manually set versions. E.g. "spring-cloud-cli" → "1.0.0.RELEASE" will set
+the spring-cloud-cli.version to 1.0.0.RELEASE regardless of what was set in spring-cloud-release projectreleaser.git.clone-destination-dir - Where should the Spring Cloud Release repo get cloned to. If null defaults to a temporary directoryreleaser.git.spring-cloud-release-git-url - URL to Spring Cloud Release Git repository. Defaults to https://github.com/spring-cloud/spring-cloud-releasereleaser.git.oauth-token - GitHub OAuth token to be used to interact with GitHub repo.releaser.maven.build-command - Command to be executed to build the project. Defaults to ./mvnw clean install -Pdocsreleaser.maven.deploy-command - Command to be executed to deploy a built project". Defaults to ./mvnw deploy -DskipTests -Pfastreleaser.maven.publish-docs-commands - Command to be executed to deploy a built project. If present {{version}} will be replaced by the proper version.
+Defaults to the standard Spring Cloud wget and execution of ghpages.releaser.maven.wait-time-in-minutes - Max wait time in minutes for the process to finish. Defaults to 20releaser.gradle.gradle-props-substitution - a map containing a key which is a property key inside gradle.properties and a value of
+a project name. E.g. in gradle.properties you have foo=1.0.0.BUILD-SNAPSHOT and you would like spring-cloud-contract version to
+be set there. Just provide a mapping for the gradle-props-substition looking like this foo=spring-cloud-contract and the result
+(e.g for sc-contract version 2.0.0.RELEASE) will be an updated gradle.properties with entry foo=2.0.0.RELEASEreleaser.pom.branch - Which branch of Spring Cloud Release should be checked out. Defaults to "master",releaser.pom.ignored-pom-regex - List of regular expressions of ignored poms. Defaults to test projects and samples.,releaser.working-dir - By default Releaser assumes running the program from the current working directory.![]() | Tip |
|---|---|
You can pass the options either via system properties or via application arguments.
+Example for system properties: |
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 http://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
![]() | Tip |
|---|---|
Notice that we’re downloading the jar to a parent folder, not to |
By deafult the releaser will default to using the master branch of spring-cloud-release.
+If you would like to use another branch you can specify it using the releaser.pom.branch property.
$ java -jar spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
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
$ export RELEASER_POM_BRANCH=Dalston.RELEASE +$ export RELEASER_GIT_OAUTH_TOKEN=... +$ wget http://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
I got such an exception
Caused by: org.eclipse.jgit.errors.TransportException: git@github.com:spring-cloud/spring-cloud-sleuth.git: Auth fail + at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:160) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:322) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:167) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.Transport.push(Transport.java:1275) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:161) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + ... 25 common frames omitted +Caused by: com.jcraft.jsch.JSchException: Auth fail + at com.jcraft.jsch.Session.connect(Session.java:512) ~[jsch-0.1.53.jar!/:na] + at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:117) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + ... 31 common frames omitted
To fix that just call
# to run the agent +$ eval `ssh-agent` +# to store the pass in the agent +$ ssh-add ~/.ssh/id_rsa
before running the app
Table of Contents
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.
Modifies the project versions with values from SC-Release
Performs the build and checks if the docs modules have properly created the documentation
docs module there’s an unresolved tag in any HTML filespring-cloud-static for non-snapshots, to gh-pages for snapshots)1.0.1.RELEASE → 1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)v1.0.1.RELEASE) (ONLY FOR NON-SNAPSHOT VERSIONS)target/email.txt (ONLY FOR NON-SNAPSHOT VERSIONS)target/blog.md (ONLY FOR NON-SNAPSHOT VERSIONS)target/tweet.txt (ONLY FOR NON-SNAPSHOT VERSIONS)Members of the Spring Cloud Team typically use this tool as follows. They first +clone the releaser locally and build the jar manually
$ git clone git@github.com:spring-cloud/spring-cloud-release-tools.git
+$ cd spring-cloud-release-tools
+$ ./mvnw clean installGo to your project (e.g. Spring Cloud Sleuth)
$ 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
The application will start running from your working directory.
![]() | Tip |
|---|---|
It is important that you clone the repository you are going to release using SSH in order for the
+ |
You will see text similar to this one
=== WHAT DO YOU WANT TO DO? === + +0) Perform a full release of this project without interruptions +1) Perform a full release of this project in a verbose mode (you'll be asked about skipping steps) +2) Update poms with versions from Spring Cloud Release +3) Build the project +4) Commit, tag and push the tag +5) Deploy the artifacts to Artifactory +6) Publish the docs +7) Go back to snapshots and bump originalVersion by patch +8) Push the commits +9) Close the milestone at Github +10) Create email / tweet etc. templates + + +You can press 'q' to quit
Just pick a number and continue! Pick either a full release or single steps.
![]() | Tip |
|---|---|
Read before picking a number cause it might have changed between tool releases ;) |
releaser.fixed-versions - A String to String mapping of manually set versions. E.g. "spring-cloud-cli" → "1.0.0.RELEASE" will set
+the spring-cloud-cli.version to 1.0.0.RELEASE regardless of what was set in spring-cloud-release projectreleaser.git.clone-destination-dir - Where should the Spring Cloud Release repo get cloned to. If null defaults to a temporary directoryreleaser.git.spring-cloud-release-git-url - URL to Spring Cloud Release Git repository. Defaults to https://github.com/spring-cloud/spring-cloud-releasereleaser.git.oauth-token - GitHub OAuth token to be used to interact with GitHub repo.releaser.maven.build-command - Command to be executed to build the project. Defaults to ./mvnw clean install -Pdocsreleaser.maven.deploy-command - Command to be executed to deploy a built project". Defaults to ./mvnw deploy -DskipTests -Pfastreleaser.maven.publish-docs-commands - Command to be executed to deploy a built project. If present {{version}} will be replaced by the proper version.
+Defaults to the standard Spring Cloud wget and execution of ghpages.releaser.maven.wait-time-in-minutes - Max wait time in minutes for the process to finish. Defaults to 20releaser.gradle.gradle-props-substitution - a map containing a key which is a property key inside gradle.properties and a value of
+a project name. E.g. in gradle.properties you have foo=1.0.0.BUILD-SNAPSHOT and you would like spring-cloud-contract version to
+be set there. Just provide a mapping for the gradle-props-substition looking like this foo=spring-cloud-contract and the result
+(e.g for sc-contract version 2.0.0.RELEASE) will be an updated gradle.properties with entry foo=2.0.0.RELEASEreleaser.pom.branch - Which branch of Spring Cloud Release should be checked out. Defaults to "master",releaser.pom.ignored-pom-regex - List of regular expressions of ignored poms. Defaults to test projects and samples.,releaser.working-dir - By default Releaser assumes running the program from the current working directory.![]() | Tip |
|---|---|
You can pass the options either via system properties or via application arguments.
+Example for system properties: |
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 http://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
![]() | Tip |
|---|---|
Notice that we’re downloading the jar to a parent folder, not to |
By deafult the releaser will default to using the master branch of spring-cloud-release.
+If you would like to use another branch you can specify it using the releaser.pom.branch property.
$ java -jar spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6
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
$ export RELEASER_POM_BRANCH=Dalston.RELEASE +$ export RELEASER_GIT_OAUTH_TOKEN=... +$ wget http://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
I got such an exception
Caused by: org.eclipse.jgit.errors.TransportException: git@github.com:spring-cloud/spring-cloud-sleuth.git: Auth fail + at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:160) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:137) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:322) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:167) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:160) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.transport.Transport.push(Transport.java:1275) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:161) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + ... 25 common frames omitted +Caused by: com.jcraft.jsch.JSchException: Auth fail + at com.jcraft.jsch.Session.connect(Session.java:512) ~[jsch-0.1.53.jar!/:na] + at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:117) ~[org.eclipse.jgit-4.6.0.201612231935-r.jar!/:4.6.0.201612231935-r] + ... 31 common frames omitted
To fix that just call
# to run the agent +$ eval `ssh-agent` +# to store the pass in the agent +$ ssh-add ~/.ssh/id_rsa
before running the app