From 45f70964b98f3ef7dc600e8be5ea69748e64b125 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 7 Sep 2017 10:56:56 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- multi/multi__spring_cloud_release_tools.html | 86 ++++++++++++-- multi/multi_spring-cloud-release-tools.html | 2 +- single/spring-cloud-release-tools.html | 88 ++++++++++++-- spring-cloud-release-tools.xml | 116 ++++++++++++++++++- 4 files changed, 266 insertions(+), 26 deletions(-) diff --git a/multi/multi__spring_cloud_release_tools.html b/multi/multi__spring_cloud_release_tools.html index fcf76465..48873a83 100644 --- a/multi/multi__spring_cloud_release_tools.html +++ b/multi/multi__spring_cloud_release_tools.html @@ -1,10 +1,10 @@ 1. Spring Cloud Release Tools

1. 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.

1.1 What does it do?

  • Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)
  • Modifies the project versions with values from SC-Release

    • throws an exception when we bump versions to release and there’s a SNAPSHOT version referenced in the POM
  • Performs the build and checks if the docs modules have properly created the documentation

    • throws an exception when in the docs module there’s an unresolved tag in any HTML file
  • Commits changed poms (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Creates a tag for the release / milestone (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Runs the deployment of the artifacts
  • Publishes the docs (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.RELEASE1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)
  • Closes the milestone on Github (e.g. v1.0.1.RELEASE) (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates an email template under target/email.txt (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a blog template under target/blog.md (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a tweet template under target/tweet.txt (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a release notes template under target/notes.md (ONLY FOR NON-SNAPSHOT VERSIONS)

1.2 How to run it

Members of the Spring Cloud Team typically use this tool as follows. They first +why this tool makes it easy to automate the release / dependency update process of our applications.

1.1 What does it do?

  • Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)
  • Modifies the project versions with values from SC-Release

    • throws an exception when we bump versions to release and there’s a SNAPSHOT version referenced in the POM
  • Performs the build and checks if the docs modules have properly created the documentation

    • throws an exception when in the docs module there’s an unresolved tag in any HTML file
  • Commits changed poms (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Creates a tag for the release / milestone (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Runs the deployment of the artifacts
  • Publishes the docs (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.RELEASE1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)
  • Closes the milestone on Github (e.g. v1.0.1.RELEASE) (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates an email template under target/email.txt (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a blog template under target/blog.md (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a tweet template under target/tweet.txt (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a release notes template under target/notes.md (ONLY FOR NON-SNAPSHOT VERSIONS)

1.2 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

$ git clone git@github.com:spring-cloud/spring-cloud-release-tools.git
 $ cd spring-cloud-release-tools
-$ ./mvnw clean install

Go to your project (e.g. Spring Cloud Sleuth)

$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
+$ ./mvnw clean install

1.3 How to run it (interactive mode)

Go 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]Tip

It is important that you clone the repository you are going to release using SSH in order for the @@ -15,15 +15,83 @@ $ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/ 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 +5) Deploy the artifacts 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 +10) Create email / blog / tweet etc. templates + +You can pick a range of options by using the hyphen - e.g. '2-4' will execute jobs [2,3,4] +You can execute all tasks starting from a job by using a hyphen and providing only one number - e.g. '8-' will execute jobs [8,9,10] +You can execute given tasks by providing a colon separated list of tasks - e.g. '3,7,8' will execute jobs [3,7,8] + +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 +- that you will execute all steps starting from the given one.

[Tip]Tip

Read before picking a number cause it might have changed between tool releases ;)

1.4 How to run it (automatic mode)

Go to your project (e.g. Spring Cloud Sleuth) and execute the application with -h or --help +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

You will see a help screen looking like more or less like this

Here you can find the list of tasks in order
+
+[updatePoms,build,commit,deploy,docs,snapshots,push,closeMilestone,createTemplates]
 
 
-You can press 'q' to quit

Just pick a number and continue! Pick either a full release or single steps.

[Tip]Tip

Read before picking a number cause it might have changed between tool releases ;)

1.3 Project options

  • releaser.fixed-versions - A String to String mapping of manually set versions. E.g. "spring-cloud-cli" → "1.0.0.RELEASE" will set +Option Description +------ ----------- +-a, --start-from <String> Starts all release task starting from the given + task. Requires passing the task name (either + one letter or the full name) +-b, --build [String] Build the project +-c, --commit [String] Commit, tag and push the tag +-d, --deploy [String] Deploy the artifacts +-f, --full-release [Boolean] Do you want to do the full release (default: + false) +-h, --help [String] +-i, --interactive <Boolean> Do you want to set the properties from the + command line (default: true) +-m, --closeMilestone [String] Close the milestone at Github +-o, --docs [String] Publish the docs +-p, --push [String] Push the commits +-r, --range <String> Runs release tasks from the given range. + Requires passing the task names with a + hyphen. The first task is inclusive, the + second inclusive. E.g. 's-m' would mean + running 'snapshot', 'push' and 'milestone' + tasks +-s, --snapshots [String] Go back to snapshots and bump originalVersion + by patch +-t, --createTemplates [String] Create email / blog / tweet etc. templates +-u, --updatePoms [String] Update poms with versions from Spring Cloud + Release + +Examples of usage: + +Run 'build' & 'commit' & 'deploy' +java -jar releaser.jar -b -c -d + +Start from 'push' +java -jar releaser.jar -a push + +Range 'docs' -> 'push' +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.

    A couple of examples:

    Doing the full release in interactive mode (asking for skipping steps).  +

    $ 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

    +

    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

    +

    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

    +

    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

    +

    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

    +

    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

    +

1.5 Project options

  • 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 project
  • releaser.git.clone-destination-dir - Where should the Spring Cloud Release repo get cloned to. If null defaults to a temporary directory
  • releaser.git.spring-cloud-release-git-url - URL to Spring Cloud Release Git repository. Defaults to https://github.com/spring-cloud/spring-cloud-release
  • releaser.git.oauth-token - GitHub OAuth token to be used to interact with GitHub repo.
  • releaser.git.number-of-checked-milestones - In order not to iterate endlessly over milestones we introduce a threshold of milestones that we will go through to find the matching milestone. Defaults to 10
  • releaser.maven.build-command - Command to be executed to build the project. Defaults to ./mvnw clean install -Pdocs
  • releaser.maven.deploy-command - Command to be executed to deploy a built project". Defaults to ./mvnw deploy -DskipTests -Pfast
  • releaser.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 20
  • releaser.gradle.gradle-props-substitution - a map containing a key which is a property key inside gradle.properties and a value of @@ -31,18 +99,18 @@ a project name. E.g. in gradle.properties you have 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.RELEASE
  • releaser.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]Tip

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 argumemts: java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6

1.4 Examples

1.4.1 Keeping configuration in the project

If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed +Example for application argumemts: java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6

1.6 Examples

1.6.1 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 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]Tip

Notice that we’re downloading the jar to a parent folder, not to target. That’s because target get cleaned -during the build process

1.4.2 Specifying A Branch

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

1.4.3 Using Environment Variables

In some cases it might be easier to specify environment variables instead of passing parameters to +during the build process

1.6.2 Specifying A Branch

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

1.6.3 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

$ 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

1.5 FAQ

1.5.1 JSchException: Auth fail

I got such an exception

Caused by: org.eclipse.jgit.errors.TransportException: git@github.com:spring-cloud/spring-cloud-sleuth.git: Auth fail
+$ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.working-dir=/path/to/project/root

1.7 FAQ

1.7.1 JSchException: Auth fail

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]
diff --git a/multi/multi_spring-cloud-release-tools.html b/multi/multi_spring-cloud-release-tools.html
index 18b01278..93ba3659 100644
--- a/multi/multi_spring-cloud-release-tools.html
+++ b/multi/multi_spring-cloud-release-tools.html
@@ -1,3 +1,3 @@
 
       
-   Spring Cloud Release Tools
\ No newline at end of file
+   Spring Cloud Release Tools
\ No newline at end of file
diff --git a/single/spring-cloud-release-tools.html b/single/spring-cloud-release-tools.html
index 6cdc78a8..20cce4b2 100644
--- a/single/spring-cloud-release-tools.html
+++ b/single/spring-cloud-release-tools.html
@@ -1,10 +1,10 @@
 
       
-   Spring Cloud Release Tools

Spring Cloud Release Tools


1. 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.

1.1 What does it do?

  • Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)
  • Modifies the project versions with values from SC-Release

    • throws an exception when we bump versions to release and there’s a SNAPSHOT version referenced in the POM
  • Performs the build and checks if the docs modules have properly created the documentation

    • throws an exception when in the docs module there’s an unresolved tag in any HTML file
  • Commits changed poms (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Creates a tag for the release / milestone (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Runs the deployment of the artifacts
  • Publishes the docs (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.RELEASE1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)
  • Closes the milestone on Github (e.g. v1.0.1.RELEASE) (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates an email template under target/email.txt (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a blog template under target/blog.md (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a tweet template under target/tweet.txt (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a release notes template under target/notes.md (ONLY FOR NON-SNAPSHOT VERSIONS)

1.2 How to run it

Members of the Spring Cloud Team typically use this tool as follows. They first + Spring Cloud Release Tools

Spring Cloud Release Tools


1. 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.

1.1 What does it do?

  • Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)
  • Modifies the project versions with values from SC-Release

    • throws an exception when we bump versions to release and there’s a SNAPSHOT version referenced in the POM
  • Performs the build and checks if the docs modules have properly created the documentation

    • throws an exception when in the docs module there’s an unresolved tag in any HTML file
  • Commits changed poms (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Creates a tag for the release / milestone (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Runs the deployment of the artifacts
  • Publishes the docs (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.RELEASE1.0.2.BUILD-SNAPSHOT) (ONLY FOR RELEASE VERSIONS)
  • Closes the milestone on Github (e.g. v1.0.1.RELEASE) (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates an email template under target/email.txt (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a blog template under target/blog.md (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a tweet template under target/tweet.txt (ONLY FOR NON-SNAPSHOT VERSIONS)
  • Generates a release notes template under target/notes.md (ONLY FOR NON-SNAPSHOT VERSIONS)

1.2 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

$ git clone git@github.com:spring-cloud/spring-cloud-release-tools.git
 $ cd spring-cloud-release-tools
-$ ./mvnw clean install

Go to your project (e.g. Spring Cloud Sleuth)

$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
+$ ./mvnw clean install

1.3 How to run it (interactive mode)

Go 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]Tip

It is important that you clone the repository you are going to release using SSH in order for the @@ -15,15 +15,83 @@ $ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/ 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 +5) Deploy the artifacts 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 +10) Create email / blog / tweet etc. templates + +You can pick a range of options by using the hyphen - e.g. '2-4' will execute jobs [2,3,4] +You can execute all tasks starting from a job by using a hyphen and providing only one number - e.g. '8-' will execute jobs [8,9,10] +You can execute given tasks by providing a colon separated list of tasks - e.g. '3,7,8' will execute jobs [3,7,8] + +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 +- that you will execute all steps starting from the given one.

[Tip]Tip

Read before picking a number cause it might have changed between tool releases ;)

1.4 How to run it (automatic mode)

Go to your project (e.g. Spring Cloud Sleuth) and execute the application with -h or --help +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

You will see a help screen looking like more or less like this

Here you can find the list of tasks in order
+
+[updatePoms,build,commit,deploy,docs,snapshots,push,closeMilestone,createTemplates]
 
 
-You can press 'q' to quit

Just pick a number and continue! Pick either a full release or single steps.

[Tip]Tip

Read before picking a number cause it might have changed between tool releases ;)

1.3 Project options

  • releaser.fixed-versions - A String to String mapping of manually set versions. E.g. "spring-cloud-cli" → "1.0.0.RELEASE" will set +Option Description +------ ----------- +-a, --start-from <String> Starts all release task starting from the given + task. Requires passing the task name (either + one letter or the full name) +-b, --build [String] Build the project +-c, --commit [String] Commit, tag and push the tag +-d, --deploy [String] Deploy the artifacts +-f, --full-release [Boolean] Do you want to do the full release (default: + false) +-h, --help [String] +-i, --interactive <Boolean> Do you want to set the properties from the + command line (default: true) +-m, --closeMilestone [String] Close the milestone at Github +-o, --docs [String] Publish the docs +-p, --push [String] Push the commits +-r, --range <String> Runs release tasks from the given range. + Requires passing the task names with a + hyphen. The first task is inclusive, the + second inclusive. E.g. 's-m' would mean + running 'snapshot', 'push' and 'milestone' + tasks +-s, --snapshots [String] Go back to snapshots and bump originalVersion + by patch +-t, --createTemplates [String] Create email / blog / tweet etc. templates +-u, --updatePoms [String] Update poms with versions from Spring Cloud + Release + +Examples of usage: + +Run 'build' & 'commit' & 'deploy' +java -jar releaser.jar -b -c -d + +Start from 'push' +java -jar releaser.jar -a push + +Range 'docs' -> 'push' +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.

    A couple of examples:

    Doing the full release in interactive mode (asking for skipping steps).  +

    $ 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

    +

    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

    +

    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

    +

    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

    +

    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

    +

    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

    +

1.5 Project options

  • 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 project
  • releaser.git.clone-destination-dir - Where should the Spring Cloud Release repo get cloned to. If null defaults to a temporary directory
  • releaser.git.spring-cloud-release-git-url - URL to Spring Cloud Release Git repository. Defaults to https://github.com/spring-cloud/spring-cloud-release
  • releaser.git.oauth-token - GitHub OAuth token to be used to interact with GitHub repo.
  • releaser.git.number-of-checked-milestones - In order not to iterate endlessly over milestones we introduce a threshold of milestones that we will go through to find the matching milestone. Defaults to 10
  • releaser.maven.build-command - Command to be executed to build the project. Defaults to ./mvnw clean install -Pdocs
  • releaser.maven.deploy-command - Command to be executed to deploy a built project". Defaults to ./mvnw deploy -DskipTests -Pfast
  • releaser.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 20
  • releaser.gradle.gradle-props-substitution - a map containing a key which is a property key inside gradle.properties and a value of @@ -31,18 +99,18 @@ a project name. E.g. in gradle.properties you have 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.RELEASE
  • releaser.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]Tip

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 argumemts: java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6

1.4 Examples

1.4.1 Keeping configuration in the project

If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed +Example for application argumemts: java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6

1.6 Examples

1.6.1 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 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]Tip

Notice that we’re downloading the jar to a parent folder, not to target. That’s because target get cleaned -during the build process

1.4.2 Specifying A Branch

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

1.4.3 Using Environment Variables

In some cases it might be easier to specify environment variables instead of passing parameters to +during the build process

1.6.2 Specifying A Branch

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

1.6.3 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

$ 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

1.5 FAQ

1.5.1 JSchException: Auth fail

I got such an exception

Caused by: org.eclipse.jgit.errors.TransportException: git@github.com:spring-cloud/spring-cloud-sleuth.git: Auth fail
+$ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.working-dir=/path/to/project/root

1.7 FAQ

1.7.1 JSchException: Auth fail

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]
diff --git a/spring-cloud-release-tools.xml b/spring-cloud-release-tools.xml
index 2e16bc8b..dbd68552 100644
--- a/spring-cloud-release-tools.xml
+++ b/spring-cloud-release-tools.xml
@@ -4,7 +4,7 @@
 
 
 Spring Cloud Release Tools
-2017-09-06
+2017-09-07
 
 
 Spring Cloud Release Tools
@@ -64,13 +64,16 @@ why this tool makes it easy to automate the release / dependency update process
 
 
 
-
-How to run it +
+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 $ git clone git@github.com:spring-cloud/spring-cloud-release-tools.git $ cd spring-cloud-release-tools $ ./mvnw clean install +
+
+How to run it (interactive mode) Go to your project (e.g. Spring Cloud Sleuth) $ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git $ cd spring-cloud-sleuth @@ -89,20 +92,121 @@ $ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/ 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 +5) Deploy the artifacts 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 +10) Create email / blog / tweet etc. templates +You can pick a range of options by using the hyphen - e.g. '2-4' will execute jobs [2,3,4] +You can execute all tasks starting from a job by using a hyphen and providing only one number - e.g. '8-' will execute jobs [8,9,10] +You can execute given tasks by providing a colon separated list of tasks - e.g. '3,7,8' will execute jobs [3,7,8] You can press 'q' to quit -Just pick a number and continue! Pick either a full release or single steps. +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. Read before picking a number cause it might have changed between tool releases ;)
+
+How to run it (automatic mode) +Go to your project (e.g. Spring Cloud Sleuth) and execute the application with -h or --help +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 +You will see a help screen looking like more or less like this +Here you can find the list of tasks in order + +[updatePoms,build,commit,deploy,docs,snapshots,push,closeMilestone,createTemplates] + + +Option Description +------ ----------- +-a, --start-from <String> Starts all release task starting from the given + task. Requires passing the task name (either + one letter or the full name) +-b, --build [String] Build the project +-c, --commit [String] Commit, tag and push the tag +-d, --deploy [String] Deploy the artifacts +-f, --full-release [Boolean] Do you want to do the full release (default: + false) +-h, --help [String] +-i, --interactive <Boolean> Do you want to set the properties from the + command line (default: true) +-m, --closeMilestone [String] Close the milestone at Github +-o, --docs [String] Publish the docs +-p, --push [String] Push the commits +-r, --range <String> Runs release tasks from the given range. + Requires passing the task names with a + hyphen. The first task is inclusive, the + second inclusive. E.g. 's-m' would mean + running 'snapshot', 'push' and 'milestone' + tasks +-s, --snapshots [String] Go back to snapshots and bump originalVersion + by patch +-t, --createTemplates [String] Create email / blog / tweet etc. templates +-u, --updatePoms [String] Update poms with versions from Spring Cloud + Release + +Examples of usage: + +Run 'build' & 'commit' & 'deploy' +java -jar releaser.jar -b -c -d + +Start from 'push' +java -jar releaser.jar -a push + +Range 'docs' -> 'push' +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. +A couple of examples: + +Doing the full release in interactive mode (asking for skipping steps) + +$ 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 + + + +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 + + + +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 + + + +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 + + + +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 + + + +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 + + +
Project options