Sync docs from master to gh-pages
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>1. Spring Cloud Release Tools</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="multi_spring-cloud-release-tools.html" title="Spring Cloud Release Tools"><link rel="up" href="multi_spring-cloud-release-tools.html" title="Spring Cloud Release Tools"><link rel="prev" href="multi_spring-cloud-release-tools.html" title="Spring Cloud Release Tools"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">1. Spring Cloud Release Tools</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="multi_spring-cloud-release-tools.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_spring_cloud_release_tools" href="#_spring_cloud_release_tools"></a>1. Spring Cloud Release Tools</h1></div></div></div><p>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.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_what_does_it_do" href="#_what_does_it_do"></a>1.1 What does it do?</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)</li><li class="listitem"><p class="simpara">Modifies the project versions with values from SC-Release</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">throws an exception when we bump versions to release and there’s a SNAPSHOT version referenced in the POM</li></ul></div></li><li class="listitem"><p class="simpara">Performs the build and checks if the <code class="literal">docs</code> modules have properly created the documentation</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">throws an exception when in the <code class="literal">docs</code> module there’s an unresolved tag in any HTML file</li></ul></div></li><li class="listitem">Commits changed poms (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Creates a tag for the release / milestone (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Runs the deployment of the artifacts</li><li class="listitem">Publishes the docs (to <code class="literal">spring-cloud-static</code> for non-snapshots, to <code class="literal">gh-pages</code> for snapshots)</li><li class="listitem">Reverts back to snapshots, bumps the version by a patch (<code class="literal">1.0.1.RELEASE</code> → <code class="literal">1.0.2.BUILD-SNAPSHOT</code>) (ONLY FOR RELEASE VERSIONS)</li><li class="listitem">Closes the milestone on Github (e.g. <code class="literal">v1.0.1.RELEASE</code>) (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates an email template under <code class="literal">target/email.txt</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a blog template under <code class="literal">target/blog.md</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a tweet template under <code class="literal">target/tweet.txt</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a release notes template under <code class="literal">target/notes.md</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_how_to_run_it" href="#_how_to_run_it"></a>1.2 How to run it</h2></div></div></div><p>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.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_what_does_it_do" href="#_what_does_it_do"></a>1.1 What does it do?</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)</li><li class="listitem"><p class="simpara">Modifies the project versions with values from SC-Release</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">throws an exception when we bump versions to release and there’s a SNAPSHOT version referenced in the POM</li></ul></div></li><li class="listitem"><p class="simpara">Performs the build and checks if the <code class="literal">docs</code> modules have properly created the documentation</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">throws an exception when in the <code class="literal">docs</code> module there’s an unresolved tag in any HTML file</li></ul></div></li><li class="listitem">Commits changed poms (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Creates a tag for the release / milestone (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Runs the deployment of the artifacts</li><li class="listitem">Publishes the docs (to <code class="literal">spring-cloud-static</code> for non-snapshots, to <code class="literal">gh-pages</code> for snapshots)</li><li class="listitem">Reverts back to snapshots, bumps the version by a patch (<code class="literal">1.0.1.RELEASE</code> → <code class="literal">1.0.2.BUILD-SNAPSHOT</code>) (ONLY FOR RELEASE VERSIONS)</li><li class="listitem">Closes the milestone on Github (e.g. <code class="literal">v1.0.1.RELEASE</code>) (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates an email template under <code class="literal">target/email.txt</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a blog template under <code class="literal">target/blog.md</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a tweet template under <code class="literal">target/tweet.txt</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a release notes template under <code class="literal">target/notes.md</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_what_should_i_do_first" href="#_what_should_i_do_first"></a>1.2 What should I do first?</h2></div></div></div><p>Members of the Spring Cloud Team typically use this tool as follows. They first
|
||||
clone the releaser locally and build the jar manually</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-release-tools.git
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">cd</span> spring-cloud-release-tools
|
||||
$ ./mvnw clean install</pre><p>Go to your project (e.g. Spring Cloud Sleuth)</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
|
||||
$ ./mvnw clean install</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_how_to_run_it_interactive_mode" href="#_how_to_run_it_interactive_mode"></a>1.3 How to run it (interactive mode)</h2></div></div></div><p>Go to your project (e.g. Spring Cloud Sleuth)</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">cd</span> spring-cloud-sleuth
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment"># example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser</span>
|
||||
$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser</pre><p>The application will start running from your working directory.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>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</pre><p>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.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Read before picking a number cause it might have changed between tool releases ;)</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_how_to_run_it_automatic_mode" href="#_how_to_run_it_automatic_mode"></a>1.4 How to run it (automatic mode)</h2></div></div></div><p>Go to your project (e.g. Spring Cloud Sleuth) and execute the application with <code class="literal">-h</code> or <code class="literal">--help</code>
|
||||
flag.</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">cd</span> spring-cloud-sleuth
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment"># example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser</span>
|
||||
$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -h</pre><p>You will see a help screen looking like more or less like this</p><pre class="programlisting">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</pre><p>Just pick a number and continue! Pick either a full release or single steps.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Read before picking a number cause it might have changed between tool releases ;)</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_project_options" href="#_project_options"></a>1.3 Project options</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><code class="literal">releaser.fixed-versions</code> - A String to String mapping of manually set versions. E.g. <code class="literal">"spring-cloud-cli" → "1.0.0.RELEASE"</code> 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 <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">do</span> the full release (default:
|
||||
false)
|
||||
-h, --help [String]
|
||||
-i, --interactive <Boolean> Do you want to <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">set</span> 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. <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'s-m'</span> would mean
|
||||
running <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'snapshot'</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'push'</span> and <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'milestone'</span>
|
||||
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 <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'build'</span> & <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'commit'</span> & <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'deploy'</span>
|
||||
java -jar releaser.jar -b -c -d
|
||||
|
||||
Start from <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'push'</span>
|
||||
java -jar releaser.jar -a push
|
||||
|
||||
Range <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'docs'</span> -> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'push'</span>
|
||||
java -jar releaser.jar -r o-p</pre><p>The Releaser can use two sets of options. The configuration options like <code class="literal">releaser.pom.branch</code>
|
||||
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 <code class="literal">o-p</code> is equivalent to full name <code class="literal">docs-push</code>.</p><p>A couple of examples:</p><p><b>Doing the full release in interactive mode (asking for skipping steps). </b>
|
||||
</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">cd</span> spring-cloud-sleuth
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment"># example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser</span>
|
||||
$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --full-release</pre><p>
|
||||
</p><p><b>Doing the full release in non interactive mode (automatic release). </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --full-release --interactive=false</pre><p>
|
||||
</p><p><b>Updating pom, closing milestone & createTemplates in interactive mode. </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -u -m -t</pre><p>
|
||||
</p><p><b>Running all tasks starting from 'push' (automatic). </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -a push -i=false</pre><p>
|
||||
</p><p><b>Running tasks from 'docs' (inclusive) to 'push' (inclusive) (automatic). </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -r d-p -i=false</pre><p>
|
||||
</p><p><b>Running single task 'closeMilestone' (automatic). </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --closeMilestone -i=false</pre><p>
|
||||
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_project_options" href="#_project_options"></a>1.5 Project options</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><code class="literal">releaser.fixed-versions</code> - A String to String mapping of manually set versions. E.g. <code class="literal">"spring-cloud-cli" → "1.0.0.RELEASE"</code> will set
|
||||
the <code class="literal">spring-cloud-cli.version</code> to <code class="literal">1.0.0.RELEASE</code> regardless of what was set in <code class="literal">spring-cloud-release</code> project</li><li class="listitem"><code class="literal">releaser.git.clone-destination-dir</code> - Where should the Spring Cloud Release repo get cloned to. If null defaults to a temporary directory</li><li class="listitem"><code class="literal">releaser.git.spring-cloud-release-git-url</code> - URL to Spring Cloud Release Git repository. Defaults to <code class="literal"><a class="link" href="https://github.com/spring-cloud/spring-cloud-release" target="_top">https://github.com/spring-cloud/spring-cloud-release</a></code></li><li class="listitem"><code class="literal">releaser.git.oauth-token</code> - GitHub OAuth token to be used to interact with GitHub repo.</li><li class="listitem"><code class="literal">releaser.git.number-of-checked-milestones</code> - 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 <code class="literal">10</code></li><li class="listitem"><code class="literal">releaser.maven.build-command</code> - Command to be executed to build the project. Defaults to <code class="literal">./mvnw clean install -Pdocs</code></li><li class="listitem"><code class="literal">releaser.maven.deploy-command</code> - Command to be executed to deploy a built project". Defaults to <code class="literal">./mvnw deploy -DskipTests -Pfast</code></li><li class="listitem"><code class="literal">releaser.maven.publish-docs-commands</code> - Command to be executed to deploy a built project. If present <code class="literal">{{version}}</code> will be replaced by the proper version.
|
||||
Defaults to the standard Spring Cloud wget and execution of ghpages.</li><li class="listitem"><code class="literal">releaser.maven.wait-time-in-minutes</code> - Max wait time in minutes for the process to finish. Defaults to <code class="literal">20</code></li><li class="listitem"><code class="literal">releaser.gradle.gradle-props-substitution</code> - a map containing a <code class="literal">key</code> which is a property key inside <code class="literal">gradle.properties</code> and a <code class="literal">value</code> of
|
||||
@@ -31,18 +99,18 @@ a project name. E.g. in <code class="literal">gradle.properties</code> you have
|
||||
be set there. Just provide a mapping for the <code class="literal">gradle-props-substition</code> looking like this <code class="literal">foo=spring-cloud-contract</code> and the result
|
||||
(e.g for sc-contract version <code class="literal">2.0.0.RELEASE</code>) will be an updated <code class="literal">gradle.properties</code> with entry <code class="literal">foo=2.0.0.RELEASE</code></li><li class="listitem"><code class="literal">releaser.pom.branch</code> - Which branch of Spring Cloud Release should be checked out. Defaults to "master",</li><li class="listitem"><code class="literal">releaser.pom.ignored-pom-regex</code> - List of regular expressions of ignored poms. Defaults to test projects and samples.,</li><li class="listitem"><code class="literal">releaser.working-dir</code> - By default Releaser assumes running the program from the current working directory.</li></ul></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>You can pass the options either via system properties or via application arguments.
|
||||
Example for system properties: <code class="literal">java -Dreleaser.pom.branch=Camden.SR6 -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar</code>
|
||||
Example for application argumemts: <code class="literal">java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6</code></p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_examples" href="#_examples"></a>1.4 Examples</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_keeping_configuration_in_the_project" href="#_keeping_configuration_in_the_project"></a>1.4.1 Keeping configuration in the project</h3></div></div></div><p>If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed
|
||||
Example for application argumemts: <code class="literal">java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6</code></p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_examples" href="#_examples"></a>1.6 Examples</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_keeping_configuration_in_the_project" href="#_keeping_configuration_in_the_project"></a>1.6.1 Keeping configuration in the project</h3></div></div></div><p>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. <code class="literal">releaser.yml</code> under <code class="literal">config</code>
|
||||
folder and run your application like this:</p><pre class="programlisting">$ wget http://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar -O ../spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar
|
||||
$ java -jar target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --spring.config.name=releaser</pre><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Notice that we’re downloading the jar to a parent folder, not to <code class="literal">target</code>. That’s because <code class="literal">target</code> get cleaned
|
||||
during the build process</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_specifying_a_branch" href="#_specifying_a_branch"></a>1.4.2 Specifying A Branch</h3></div></div></div><p>By deafult the releaser will default to using the <code class="literal">master</code> branch of <code class="literal">spring-cloud-release</code>.
|
||||
If you would like to use another branch you can specify it using the <code class="literal">releaser.pom.branch</code> property.</p><pre class="programlisting">$ java -jar spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --releaser.pom.branch=Camden.SR6</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_using_environment_variables" href="#_using_environment_variables"></a>1.4.3 Using Environment Variables</h3></div></div></div><p>In some cases it might be easier to specify environment variables instead of passing parameters to
|
||||
during the build process</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_specifying_a_branch" href="#_specifying_a_branch"></a>1.6.2 Specifying A Branch</h3></div></div></div><p>By deafult the releaser will default to using the <code class="literal">master</code> branch of <code class="literal">spring-cloud-release</code>.
|
||||
If you would like to use another branch you can specify it using the <code class="literal">releaser.pom.branch</code> property.</p><pre class="programlisting">$ java -jar spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --releaser.pom.branch=Camden.SR6</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_using_environment_variables" href="#_using_environment_variables"></a>1.6.3 Using Environment Variables</h3></div></div></div><p>In some cases it might be easier to specify environment variables instead of passing parameters to
|
||||
<code class="literal">releaser</code>. 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</p><pre class="programlisting">$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">export</span> RELEASER_POM_BRANCH=Dalston.RELEASE
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">export</span> RELEASER_GIT_OAUTH_TOKEN=...
|
||||
$ wget http://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar -O spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar
|
||||
$ java -jar target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --releaser.working-dir=/path/to/project/root</pre></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_faq" href="#_faq"></a>1.5 FAQ</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_jschexception_auth_fail" href="#_jschexception_auth_fail"></a>1.5.1 JSchException: Auth fail</h3></div></div></div><p>I got such an exception</p><pre class="screen">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-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --releaser.working-dir=/path/to/project/root</pre></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_faq" href="#_faq"></a>1.7 FAQ</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_jschexception_auth_fail" href="#_jschexception_auth_fail"></a>1.7.1 JSchException: Auth fail</h3></div></div></div><p>I got such an exception</p><pre class="screen">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]
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Spring Cloud Release Tools</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="multi_spring-cloud-release-tools.html" title="Spring Cloud Release Tools"><link rel="next" href="multi__spring_cloud_release_tools.html" title="1. Spring Cloud Release Tools"></head><body class="firstpage" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Spring Cloud Release Tools</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="multi__spring_cloud_release_tools.html">Next</a></td></tr></table><hr></div><div lang="en" class="book"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3"></a>Spring Cloud Release Tools</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="multi__spring_cloud_release_tools.html">1. Spring Cloud Release Tools</a></span></dt><dd><dl><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_what_does_it_do">1.1. What does it do?</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_how_to_run_it">1.2. How to run it</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_project_options">1.3. Project options</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_examples">1.4. Examples</a></span></dt><dd><dl><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_keeping_configuration_in_the_project">1.4.1. Keeping configuration in the project</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_specifying_a_branch">1.4.2. Specifying A Branch</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_using_environment_variables">1.4.3. Using Environment Variables</a></span></dt></dl></dd><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_faq">1.5. FAQ</a></span></dt><dd><dl><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_jschexception_auth_fail">1.5.1. JSchException: Auth fail</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__spring_cloud_release_tools.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> 1. Spring Cloud Release Tools</td></tr></table></div></body></html>
|
||||
<title>Spring Cloud Release Tools</title><link rel="stylesheet" type="text/css" href="css/manual-multipage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="multi_spring-cloud-release-tools.html" title="Spring Cloud Release Tools"><link rel="next" href="multi__spring_cloud_release_tools.html" title="1. Spring Cloud Release Tools"></head><body class="firstpage" bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Spring Cloud Release Tools</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="multi__spring_cloud_release_tools.html">Next</a></td></tr></table><hr></div><div lang="en" class="book"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3"></a>Spring Cloud Release Tools</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="multi__spring_cloud_release_tools.html">1. Spring Cloud Release Tools</a></span></dt><dd><dl><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_what_does_it_do">1.1. What does it do?</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_what_should_i_do_first">1.2. What should I do first?</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_how_to_run_it_interactive_mode">1.3. How to run it (interactive mode)</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_how_to_run_it_automatic_mode">1.4. How to run it (automatic mode)</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_project_options">1.5. Project options</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_examples">1.6. Examples</a></span></dt><dd><dl><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_keeping_configuration_in_the_project">1.6.1. Keeping configuration in the project</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_specifying_a_branch">1.6.2. Specifying A Branch</a></span></dt><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_using_environment_variables">1.6.3. Using Environment Variables</a></span></dt></dl></dd><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_faq">1.7. FAQ</a></span></dt><dd><dl><dt><span class="section"><a href="multi__spring_cloud_release_tools.html#_jschexception_auth_fail">1.7.1. JSchException: Auth fail</a></span></dt></dl></dd></dl></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="multi__spring_cloud_release_tools.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"> </td><td width="40%" align="right" valign="top"> 1. Spring Cloud Release Tools</td></tr></table></div></body></html>
|
||||
@@ -1,10 +1,10 @@
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Spring Cloud Release Tools</title><link rel="stylesheet" type="text/css" href="css/manual-singlepage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3"></a>Spring Cloud Release Tools</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="#_spring_cloud_release_tools">1. Spring Cloud Release Tools</a></span></dt><dd><dl><dt><span class="section"><a href="#_what_does_it_do">1.1. What does it do?</a></span></dt><dt><span class="section"><a href="#_how_to_run_it">1.2. How to run it</a></span></dt><dt><span class="section"><a href="#_project_options">1.3. Project options</a></span></dt><dt><span class="section"><a href="#_examples">1.4. Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#_keeping_configuration_in_the_project">1.4.1. Keeping configuration in the project</a></span></dt><dt><span class="section"><a href="#_specifying_a_branch">1.4.2. Specifying A Branch</a></span></dt><dt><span class="section"><a href="#_using_environment_variables">1.4.3. Using Environment Variables</a></span></dt></dl></dd><dt><span class="section"><a href="#_faq">1.5. FAQ</a></span></dt><dd><dl><dt><span class="section"><a href="#_jschexception_auth_fail">1.5.1. JSchException: Auth fail</a></span></dt></dl></dd></dl></dd></dl></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_spring_cloud_release_tools" href="#_spring_cloud_release_tools"></a>1. Spring Cloud Release Tools</h1></div></div></div><p>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.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_what_does_it_do" href="#_what_does_it_do"></a>1.1 What does it do?</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)</li><li class="listitem"><p class="simpara">Modifies the project versions with values from SC-Release</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">throws an exception when we bump versions to release and there’s a SNAPSHOT version referenced in the POM</li></ul></div></li><li class="listitem"><p class="simpara">Performs the build and checks if the <code class="literal">docs</code> modules have properly created the documentation</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">throws an exception when in the <code class="literal">docs</code> module there’s an unresolved tag in any HTML file</li></ul></div></li><li class="listitem">Commits changed poms (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Creates a tag for the release / milestone (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Runs the deployment of the artifacts</li><li class="listitem">Publishes the docs (to <code class="literal">spring-cloud-static</code> for non-snapshots, to <code class="literal">gh-pages</code> for snapshots)</li><li class="listitem">Reverts back to snapshots, bumps the version by a patch (<code class="literal">1.0.1.RELEASE</code> → <code class="literal">1.0.2.BUILD-SNAPSHOT</code>) (ONLY FOR RELEASE VERSIONS)</li><li class="listitem">Closes the milestone on Github (e.g. <code class="literal">v1.0.1.RELEASE</code>) (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates an email template under <code class="literal">target/email.txt</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a blog template under <code class="literal">target/blog.md</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a tweet template under <code class="literal">target/tweet.txt</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a release notes template under <code class="literal">target/notes.md</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_how_to_run_it" href="#_how_to_run_it"></a>1.2 How to run it</h2></div></div></div><p>Members of the Spring Cloud Team typically use this tool as follows. They first
|
||||
<title>Spring Cloud Release Tools</title><link rel="stylesheet" type="text/css" href="css/manual-singlepage.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div lang="en" class="book"><div class="titlepage"><div><div><h1 class="title"><a name="d0e3"></a>Spring Cloud Release Tools</h1></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="chapter"><a href="#_spring_cloud_release_tools">1. Spring Cloud Release Tools</a></span></dt><dd><dl><dt><span class="section"><a href="#_what_does_it_do">1.1. What does it do?</a></span></dt><dt><span class="section"><a href="#_what_should_i_do_first">1.2. What should I do first?</a></span></dt><dt><span class="section"><a href="#_how_to_run_it_interactive_mode">1.3. How to run it (interactive mode)</a></span></dt><dt><span class="section"><a href="#_how_to_run_it_automatic_mode">1.4. How to run it (automatic mode)</a></span></dt><dt><span class="section"><a href="#_project_options">1.5. Project options</a></span></dt><dt><span class="section"><a href="#_examples">1.6. Examples</a></span></dt><dd><dl><dt><span class="section"><a href="#_keeping_configuration_in_the_project">1.6.1. Keeping configuration in the project</a></span></dt><dt><span class="section"><a href="#_specifying_a_branch">1.6.2. Specifying A Branch</a></span></dt><dt><span class="section"><a href="#_using_environment_variables">1.6.3. Using Environment Variables</a></span></dt></dl></dd><dt><span class="section"><a href="#_faq">1.7. FAQ</a></span></dt><dd><dl><dt><span class="section"><a href="#_jschexception_auth_fail">1.7.1. JSchException: Auth fail</a></span></dt></dl></dd></dl></dd></dl></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="_spring_cloud_release_tools" href="#_spring_cloud_release_tools"></a>1. Spring Cloud Release Tools</h1></div></div></div><p>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.</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_what_does_it_do" href="#_what_does_it_do"></a>1.1 What does it do?</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Clones the Spring Cloud Release project and picks all versions (Boot + Cloud projects)</li><li class="listitem"><p class="simpara">Modifies the project versions with values from SC-Release</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">throws an exception when we bump versions to release and there’s a SNAPSHOT version referenced in the POM</li></ul></div></li><li class="listitem"><p class="simpara">Performs the build and checks if the <code class="literal">docs</code> modules have properly created the documentation</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">throws an exception when in the <code class="literal">docs</code> module there’s an unresolved tag in any HTML file</li></ul></div></li><li class="listitem">Commits changed poms (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Creates a tag for the release / milestone (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Runs the deployment of the artifacts</li><li class="listitem">Publishes the docs (to <code class="literal">spring-cloud-static</code> for non-snapshots, to <code class="literal">gh-pages</code> for snapshots)</li><li class="listitem">Reverts back to snapshots, bumps the version by a patch (<code class="literal">1.0.1.RELEASE</code> → <code class="literal">1.0.2.BUILD-SNAPSHOT</code>) (ONLY FOR RELEASE VERSIONS)</li><li class="listitem">Closes the milestone on Github (e.g. <code class="literal">v1.0.1.RELEASE</code>) (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates an email template under <code class="literal">target/email.txt</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a blog template under <code class="literal">target/blog.md</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a tweet template under <code class="literal">target/tweet.txt</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li><li class="listitem">Generates a release notes template under <code class="literal">target/notes.md</code> (ONLY FOR NON-SNAPSHOT VERSIONS)</li></ul></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_what_should_i_do_first" href="#_what_should_i_do_first"></a>1.2 What should I do first?</h2></div></div></div><p>Members of the Spring Cloud Team typically use this tool as follows. They first
|
||||
clone the releaser locally and build the jar manually</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-release-tools.git
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">cd</span> spring-cloud-release-tools
|
||||
$ ./mvnw clean install</pre><p>Go to your project (e.g. Spring Cloud Sleuth)</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
|
||||
$ ./mvnw clean install</pre></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_how_to_run_it_interactive_mode" href="#_how_to_run_it_interactive_mode"></a>1.3 How to run it (interactive mode)</h2></div></div></div><p>Go to your project (e.g. Spring Cloud Sleuth)</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">cd</span> spring-cloud-sleuth
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment"># example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser</span>
|
||||
$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser</pre><p>The application will start running from your working directory.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>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</pre><p>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.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Read before picking a number cause it might have changed between tool releases ;)</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_how_to_run_it_automatic_mode" href="#_how_to_run_it_automatic_mode"></a>1.4 How to run it (automatic mode)</h2></div></div></div><p>Go to your project (e.g. Spring Cloud Sleuth) and execute the application with <code class="literal">-h</code> or <code class="literal">--help</code>
|
||||
flag.</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">cd</span> spring-cloud-sleuth
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment"># example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser</span>
|
||||
$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -h</pre><p>You will see a help screen looking like more or less like this</p><pre class="programlisting">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</pre><p>Just pick a number and continue! Pick either a full release or single steps.</p><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Read before picking a number cause it might have changed between tool releases ;)</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_project_options" href="#_project_options"></a>1.3 Project options</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><code class="literal">releaser.fixed-versions</code> - A String to String mapping of manually set versions. E.g. <code class="literal">"spring-cloud-cli" → "1.0.0.RELEASE"</code> 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 <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">do</span> the full release (default:
|
||||
false)
|
||||
-h, --help [String]
|
||||
-i, --interactive <Boolean> Do you want to <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">set</span> 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. <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'s-m'</span> would mean
|
||||
running <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'snapshot'</span>, <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'push'</span> and <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'milestone'</span>
|
||||
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 <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'build'</span> & <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'commit'</span> & <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'deploy'</span>
|
||||
java -jar releaser.jar -b -c -d
|
||||
|
||||
Start from <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'push'</span>
|
||||
java -jar releaser.jar -a push
|
||||
|
||||
Range <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'docs'</span> -> <span xmlns:d="http://docbook.org/ns/docbook" class="hl-string">'push'</span>
|
||||
java -jar releaser.jar -r o-p</pre><p>The Releaser can use two sets of options. The configuration options like <code class="literal">releaser.pom.branch</code>
|
||||
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 <code class="literal">o-p</code> is equivalent to full name <code class="literal">docs-push</code>.</p><p>A couple of examples:</p><p><b>Doing the full release in interactive mode (asking for skipping steps). </b>
|
||||
</p><pre class="programlisting">$ git clone git@github.com:spring-cloud/spring-cloud-sleuth.git
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">cd</span> spring-cloud-sleuth
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-comment"># example of running the releaser agains Dalston.SR1 tag with 1.0.0.BUILD-SNAPSHOT version of the releaser</span>
|
||||
$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --full-release</pre><p>
|
||||
</p><p><b>Doing the full release in non interactive mode (automatic release). </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --full-release --interactive=false</pre><p>
|
||||
</p><p><b>Updating pom, closing milestone & createTemplates in interactive mode. </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -u -m -t</pre><p>
|
||||
</p><p><b>Running all tasks starting from 'push' (automatic). </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -a push -i=false</pre><p>
|
||||
</p><p><b>Running tasks from 'docs' (inclusive) to 'push' (inclusive) (automatic). </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser -r d-p -i=false</pre><p>
|
||||
</p><p><b>Running single task 'closeMilestone' (automatic). </b>
|
||||
</p><pre class="programlisting">$ java -jar ~/repo/spring-cloud-release-tools/spring-cloud-release-tools-spring/target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>BUILD-SNAPSHOT.jar --releaser.pom.branch=vDalston.SR1 --spring.config.name=releaser --closeMilestone -i=false</pre><p>
|
||||
</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_project_options" href="#_project_options"></a>1.5 Project options</h2></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><code class="literal">releaser.fixed-versions</code> - A String to String mapping of manually set versions. E.g. <code class="literal">"spring-cloud-cli" → "1.0.0.RELEASE"</code> will set
|
||||
the <code class="literal">spring-cloud-cli.version</code> to <code class="literal">1.0.0.RELEASE</code> regardless of what was set in <code class="literal">spring-cloud-release</code> project</li><li class="listitem"><code class="literal">releaser.git.clone-destination-dir</code> - Where should the Spring Cloud Release repo get cloned to. If null defaults to a temporary directory</li><li class="listitem"><code class="literal">releaser.git.spring-cloud-release-git-url</code> - URL to Spring Cloud Release Git repository. Defaults to <code class="literal"><a class="link" href="https://github.com/spring-cloud/spring-cloud-release" target="_top">https://github.com/spring-cloud/spring-cloud-release</a></code></li><li class="listitem"><code class="literal">releaser.git.oauth-token</code> - GitHub OAuth token to be used to interact with GitHub repo.</li><li class="listitem"><code class="literal">releaser.git.number-of-checked-milestones</code> - 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 <code class="literal">10</code></li><li class="listitem"><code class="literal">releaser.maven.build-command</code> - Command to be executed to build the project. Defaults to <code class="literal">./mvnw clean install -Pdocs</code></li><li class="listitem"><code class="literal">releaser.maven.deploy-command</code> - Command to be executed to deploy a built project". Defaults to <code class="literal">./mvnw deploy -DskipTests -Pfast</code></li><li class="listitem"><code class="literal">releaser.maven.publish-docs-commands</code> - Command to be executed to deploy a built project. If present <code class="literal">{{version}}</code> will be replaced by the proper version.
|
||||
Defaults to the standard Spring Cloud wget and execution of ghpages.</li><li class="listitem"><code class="literal">releaser.maven.wait-time-in-minutes</code> - Max wait time in minutes for the process to finish. Defaults to <code class="literal">20</code></li><li class="listitem"><code class="literal">releaser.gradle.gradle-props-substitution</code> - a map containing a <code class="literal">key</code> which is a property key inside <code class="literal">gradle.properties</code> and a <code class="literal">value</code> of
|
||||
@@ -31,18 +99,18 @@ a project name. E.g. in <code class="literal">gradle.properties</code> you have
|
||||
be set there. Just provide a mapping for the <code class="literal">gradle-props-substition</code> looking like this <code class="literal">foo=spring-cloud-contract</code> and the result
|
||||
(e.g for sc-contract version <code class="literal">2.0.0.RELEASE</code>) will be an updated <code class="literal">gradle.properties</code> with entry <code class="literal">foo=2.0.0.RELEASE</code></li><li class="listitem"><code class="literal">releaser.pom.branch</code> - Which branch of Spring Cloud Release should be checked out. Defaults to "master",</li><li class="listitem"><code class="literal">releaser.pom.ignored-pom-regex</code> - List of regular expressions of ignored poms. Defaults to test projects and samples.,</li><li class="listitem"><code class="literal">releaser.working-dir</code> - By default Releaser assumes running the program from the current working directory.</li></ul></div><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>You can pass the options either via system properties or via application arguments.
|
||||
Example for system properties: <code class="literal">java -Dreleaser.pom.branch=Camden.SR6 -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar</code>
|
||||
Example for application argumemts: <code class="literal">java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6</code></p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_examples" href="#_examples"></a>1.4 Examples</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_keeping_configuration_in_the_project" href="#_keeping_configuration_in_the_project"></a>1.4.1 Keeping configuration in the project</h3></div></div></div><p>If your project has some custom configuration (e.g. Spring Cloud Contract needs a script to be executed
|
||||
Example for application argumemts: <code class="literal">java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.pom.branch=Camden.SR6</code></p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_examples" href="#_examples"></a>1.6 Examples</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_keeping_configuration_in_the_project" href="#_keeping_configuration_in_the_project"></a>1.6.1 Keeping configuration in the project</h3></div></div></div><p>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. <code class="literal">releaser.yml</code> under <code class="literal">config</code>
|
||||
folder and run your application like this:</p><pre class="programlisting">$ wget http://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar -O ../spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar
|
||||
$ java -jar target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --spring.config.name=releaser</pre><div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Tip"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Tip]" src="images/tip.png"></td><th align="left">Tip</th></tr><tr><td align="left" valign="top"><p>Notice that we’re downloading the jar to a parent folder, not to <code class="literal">target</code>. That’s because <code class="literal">target</code> get cleaned
|
||||
during the build process</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_specifying_a_branch" href="#_specifying_a_branch"></a>1.4.2 Specifying A Branch</h3></div></div></div><p>By deafult the releaser will default to using the <code class="literal">master</code> branch of <code class="literal">spring-cloud-release</code>.
|
||||
If you would like to use another branch you can specify it using the <code class="literal">releaser.pom.branch</code> property.</p><pre class="programlisting">$ java -jar spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --releaser.pom.branch=Camden.SR6</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_using_environment_variables" href="#_using_environment_variables"></a>1.4.3 Using Environment Variables</h3></div></div></div><p>In some cases it might be easier to specify environment variables instead of passing parameters to
|
||||
during the build process</p></td></tr></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_specifying_a_branch" href="#_specifying_a_branch"></a>1.6.2 Specifying A Branch</h3></div></div></div><p>By deafult the releaser will default to using the <code class="literal">master</code> branch of <code class="literal">spring-cloud-release</code>.
|
||||
If you would like to use another branch you can specify it using the <code class="literal">releaser.pom.branch</code> property.</p><pre class="programlisting">$ java -jar spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --releaser.pom.branch=Camden.SR6</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_using_environment_variables" href="#_using_environment_variables"></a>1.6.3 Using Environment Variables</h3></div></div></div><p>In some cases it might be easier to specify environment variables instead of passing parameters to
|
||||
<code class="literal">releaser</code>. 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</p><pre class="programlisting">$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">export</span> RELEASER_POM_BRANCH=Dalston.RELEASE
|
||||
$ <span xmlns:d="http://docbook.org/ns/docbook" class="hl-keyword">export</span> RELEASER_GIT_OAUTH_TOKEN=...
|
||||
$ wget http://repo.spring.io/libs-milestone/org/springframework/cloud/internal/spring-cloud-release-tools-spring/<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar -O spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar
|
||||
$ java -jar target/spring-cloud-release-tools-spring-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --releaser.working-dir=/path/to/project/root</pre></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_faq" href="#_faq"></a>1.5 FAQ</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_jschexception_auth_fail" href="#_jschexception_auth_fail"></a>1.5.1 JSchException: Auth fail</h3></div></div></div><p>I got such an exception</p><pre class="screen">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-<span class="hl-number">1.0</span>.<span class="hl-number">0.</span>M1.jar --releaser.working-dir=/path/to/project/root</pre></div></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="_faq" href="#_faq"></a>1.7 FAQ</h2></div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="_jschexception_auth_fail" href="#_jschexception_auth_fail"></a>1.7.1 JSchException: Auth fail</h3></div></div></div><p>I got such an exception</p><pre class="screen">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]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<book xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en">
|
||||
<info>
|
||||
<title>Spring Cloud Release Tools</title>
|
||||
<date>2017-09-06</date>
|
||||
<date>2017-09-07</date>
|
||||
</info>
|
||||
<chapter xml:id="_spring_cloud_release_tools">
|
||||
<title>Spring Cloud Release Tools</title>
|
||||
@@ -64,13 +64,16 @@ why this tool makes it easy to automate the release / dependency update process
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</section>
|
||||
<section xml:id="_how_to_run_it">
|
||||
<title>How to run it</title>
|
||||
<section xml:id="_what_should_i_do_first">
|
||||
<title>What should I do first?</title>
|
||||
<simpara>Members of the Spring Cloud Team typically use this tool as follows. They first
|
||||
clone the releaser locally and build the jar manually</simpara>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ git clone git@github.com:spring-cloud/spring-cloud-release-tools.git
|
||||
$ cd spring-cloud-release-tools
|
||||
$ ./mvnw clean install</programlisting>
|
||||
</section>
|
||||
<section xml:id="_how_to_run_it_interactive_mode">
|
||||
<title>How to run it (interactive mode)</title>
|
||||
<simpara>Go to your project (e.g. Spring Cloud Sleuth)</simpara>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ 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</screen>
|
||||
<simpara>Just pick a number and continue! Pick either a full release or single steps.</simpara>
|
||||
<simpara>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.</simpara>
|
||||
<tip>
|
||||
<simpara>Read before picking a number cause it might have changed between tool releases ;)</simpara>
|
||||
</tip>
|
||||
</section>
|
||||
<section xml:id="_how_to_run_it_automatic_mode">
|
||||
<title>How to run it (automatic mode)</title>
|
||||
<simpara>Go to your project (e.g. Spring Cloud Sleuth) and execute the application with <literal>-h</literal> or <literal>--help</literal>
|
||||
flag.</simpara>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ 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</programlisting>
|
||||
<simpara>You will see a help screen looking like more or less like this</simpara>
|
||||
<programlisting language="bash" linenumbering="unnumbered">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</programlisting>
|
||||
<simpara>The Releaser can use two sets of options. The configuration options like <literal>releaser.pom.branch</literal>
|
||||
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 <literal>o-p</literal> is equivalent to full name <literal>docs-push</literal>.</simpara>
|
||||
<simpara>A couple of examples:</simpara>
|
||||
<formalpara>
|
||||
<title>Doing the full release in interactive mode (asking for skipping steps)</title>
|
||||
<para>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ 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</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara>
|
||||
<title>Doing the full release in non interactive mode (automatic release)</title>
|
||||
<para>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ 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</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara>
|
||||
<title>Updating pom, closing milestone & createTemplates in interactive mode</title>
|
||||
<para>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ 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</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara>
|
||||
<title>Running all tasks starting from 'push' (automatic)</title>
|
||||
<para>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ 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</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara>
|
||||
<title>Running tasks from 'docs' (inclusive) to 'push' (inclusive) (automatic)</title>
|
||||
<para>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ 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</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
<formalpara>
|
||||
<title>Running single task 'closeMilestone' (automatic)</title>
|
||||
<para>
|
||||
<programlisting language="bash" linenumbering="unnumbered">$ 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</programlisting>
|
||||
</para>
|
||||
</formalpara>
|
||||
</section>
|
||||
<section xml:id="_project_options">
|
||||
<title>Project options</title>
|
||||
<itemizedlist>
|
||||
|
||||
Reference in New Issue
Block a user