Sync docs from master to gh-pages

This commit is contained in:
buildmaster
2019-06-28 21:01:28 +00:00
parent ff7f9f0b58
commit 9b490791f4
7 changed files with 244 additions and 5 deletions

BIN
images/releasers.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

BIN
images/scBuildReleaser.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

View File

@@ -108,6 +108,12 @@ $(addBlockSwitches);
<li><a href="#_using_environment_variables">Using Environment Variables</a></li>
</ul>
</li>
<li><a href="#_releasing_through_jenkins">Releasing through Jenkins</a>
<ul class="sectlevel3">
<li><a href="#_releasing_a_single_project">Releasing a Single Project</a></li>
<li><a href="#_releasing_a_release_train">Releasing a Release Train</a></li>
</ul>
</li>
<li><a href="#_faq">FAQ</a>
<ul class="sectlevel3">
<li><a href="#_jschexception_auth_fail">JSchException: Auth fail</a></li>
@@ -806,11 +812,247 @@ $ java -jar target/spring-cloud-release-tools-spring-1.0.0.M1.jar --releaser.wor
</div>
</div>
<div class="sect2">
<h3 id="_releasing_through_jenkins"><a class="link" href="#_releasing_through_jenkins">Releasing through Jenkins</a></h3>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
Whenever a release process is broken, Jenkins marks it with a red ball and breaks the build. Whenever a post-release action went wrong but the release is successful, Jenkins marks the build with a yellow ball and marks the build as unstable.
</td>
</tr>
</table>
</div>
<div class="sect3">
<h4 id="_releasing_a_single_project"><a class="link" href="#_releasing_a_single_project">Releasing a Single Project</a></h4>
<div class="paragraph">
<p>Let us assume that we are to release <code>spring-cloud-build</code> project. We need to do the following steps:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Create a branch (for example, <code>springCloudBuildRelease</code>) in a project that contains a BOM (for example, <a href="https://github.com/spring-cloud/spring-cloud-release/">spring-cloud-release</a>). The following example shows how to do so:</p>
</li>
</ol>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ git clone git@github.com:spring-cloud/spring-cloud-release.git
$ cd spring-cloud-release
$ git checkout -b springCloudBuildRelease</code></pre>
</div>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Update <strong>all</strong> versions as if you were doing a release train. We need to update the project&#8217;s versions, Boot version, and dependencies versions, too. Let us assume that we will eventually be doing a release train for the <code>Hoxton.M1</code> release, Spring Boot to the latest available one, and <code>spring-cloud-commons</code> to <code>1.2.3.BUILD-SNAPSHOT</code>. The following example shows how to do so:</p>
</li>
</ol>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">// setting the release train value
$ ./mvnw versions:set -DnewVersion=Hoxton.M1 -DgenerateBackupPoms=false -DprocessAllModules=true
// Update all parent versions
$ ./mvnw versions:update-parent -DgenerateBackupPoms=false -DprocessAllModules=true
// Setting the necessary dependencies
$ ./mvnw versions:set-property -Dproperty=spring-cloud-commons.version -DnewVersion=1.2.3.BUILD-SNAPSHOT -pl spring-cloud-dependencies -DgenerateBackupPoms=false
// NOTE!!!
// Verify that the versions set by Maven are correct!!
$ git diff
// commit and push the branch
$ git add . &amp;&amp; git commit -m "Updating project for Spring Cloud Build release" &amp;&amp; git push origin springCloudBuildRelease</code></pre>
</div>
</div>
<div class="admonitionblock important">
<table>
<tr>
<td class="icon">
<i class="fa icon-important" title="Important"></i>
</td>
<td class="content">
If you&#8217;re doing a e.g. <code>M1</code> release, remember to not have any snapshot versions in this branch.
</td>
</tr>
</table>
</div>
<div class="paragraph">
<p>Since the project is prepared, go to Jenkins and select the <a href="https://jenkins.spring.io/view/Spring%20Cloud/view/Releaser/">Releaser view</a>, which the following image shows:</p>
</div>
<div class="imageblock">
<div class="content">
<img src="https://raw.github.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/releasers.png" alt="Releaser view">
</div>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Pick the proper releaser project (for example, <code>spring-cloud-build-releaser</code>). The following image shows the settings for this example:</p>
</li>
</ol>
</div>
<div class="imageblock">
<div class="content">
<img src="https://raw.github.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/scBuildReleaser.png" alt="Spring Cloud Build Releaser - build with parameters">
</div>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Next, click <code>Build with parameters</code>. The following image shows the UI for doing so:</p>
</li>
</ol>
</div>
<div class="imageblock">
<div class="content">
<img src="https://raw.github.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/runningScBuildReleaser.png" alt="Updated `RELEASER_POM_BRANCH`">
</div>
</div>
<div class="paragraph">
<p>Pick from which branch you would like the project (for example, <code>spring-cloud-build</code> - defaults to <code>master</code>) to be built and update the <code>RELEASER_POM_BRANCH</code> to point to the checked-out branch of Spring Cloud Release (for example, <code>springCloudBuildRelease</code>). You can pick whether you want to perform only post-release tasks or the whole release.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Finally, click <code>Build</code>.</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>You are done!</p>
</div>
<div class="paragraph">
<p>As a post action, do not forget to remove the branch. The following example shows how to do so:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">// to synchronize any deleted branches (don't run this if you want leave any deleted branches that were deleted in the origin)
$ git fetch -p
$ git branch -d springCloudBuildRelease
$ git push origin --delete springCloudBuildRelease</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_releasing_a_release_train"><a class="link" href="#_releasing_a_release_train">Releasing a Release Train</a></h4>
<div class="paragraph">
<p>We call a release train a <code>meta-release</code>. In order to perform one, you need to:</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>In your project (which must contain a BOM, such as <code>spring-cloud-release</code>) you have to have a branch, where you store properties with versions of your projects. For example, the branch name can be <a href="https://github.com/spring-cloud/spring-cloud-release/tree/jenkins-releaser-config">jenkins-releaser-config</a>). The folloiwng example shows how to do so:</p>
</li>
</ol>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ git clone git@github.com:spring-cloud/spring-cloud-release.git
$ cd spring-cloud-release
$ git checkout jenkins-releaser-config</code></pre>
</div>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Create a file that contains all properties for a given release train. The name of the release train should be lowercase, and dots should be converted to underscores. For example, for the <code>Greenwich.SR2</code> release train we need to have a file named <code>greenwich_sr2.properties</code>. The following example shows how to do so:</p>
</li>
</ol>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ touch greenwich_sr2.properties</code></pre>
</div>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>We need to update the file with all versions for the release train. The properties file contains an <strong>ordered</strong> list of <code>releaser.fixed-versions[project-name]=project-version</code> entries, as the following listing shows:</p>
</li>
</ol>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">$ echo "releaser.fixed-versions[spring-boot]=2.1.5.RELEASE
releaser.fixed-versions[spring-cloud-build]=2.1.5.RELEASE
releaser.fixed-versions[spring-cloud-commons]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-function]=2.0.2.RELEASE
releaser.fixed-versions[spring-cloud-stream]=Fishtown.SR3
releaser.fixed-versions[spring-cloud-aws]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-bus]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-task]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-config]=2.1.3.RELEASE
releaser.fixed-versions[spring-cloud-netflix]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-cloudfoundry]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-kubernetes]=1.0.2.RELEASE
releaser.fixed-versions[spring-cloud-openfeign]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-consul]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-gateway]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-security]=2.1.3.RELEASE
releaser.fixed-versions[spring-cloud-sleuth]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-zookeeper]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-contract]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-gcp]=1.1.2.RELEASE
releaser.fixed-versions[spring-cloud-vault]=2.1.2.RELEASE
releaser.fixed-versions[spring-cloud-release]=Greenwich.SR2" &gt;&gt; greenwich_sr2.properties
$ git add greenwich_sr2.properties &amp;&amp; git commit -m "Added Greenwich.SR2 properties" &amp;&amp; git push origin jenkins-releaser-config</code></pre>
</div>
</div>
<div class="paragraph">
<p>Since the project is prepared, go to Jenkins and select the <a href="https://jenkins.spring.io/view/Spring%20Cloud/view/Releaser/">Releaser view</a>, as the following image shows:</p>
</div>
<div class="imageblock">
<div class="content">
<img src="https://raw.github.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/releasersForMetaRelease.png" alt="Releaser view">
</div>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Pick the proper meta-releaser project (for example, <code>spring-cloud-meta-releaser</code>), as the following image shows:</p>
</li>
</ol>
</div>
<div class="imageblock">
<div class="content">
<img src="https://raw.github.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/springCloudMetaRelease.png" alt="Spring Cloud Meta Releaser - build with parameters">
</div>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Next, click <code>Build with parameters</code>.</p>
</li>
</ol>
</div>
<div class="imageblock">
<div class="content">
<img src="https://raw.github.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/runningSpringCloudMetaReleaser.png" alt="Spring Cloud Meta Releaser view">
</div>
</div>
<div class="paragraph">
<p>You have quite a few options to pick, but the most important one is to set the value of the <code>RELEASE_VERSION</code> to the given release train version (for example, <code>Greenwich.SR2</code>). Continue updating the rest of the fields if necessary and read the field descriptions and this documentation for more information.</p>
</div>
<div class="olist arabic">
<ol class="arabic">
<li>
<p>Finally, click <code>Build</code>.</p>
</li>
</ol>
</div>
<div class="paragraph">
<p>You are done!</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_faq"><a class="link" href="#_faq">FAQ</a></h3>
<div class="sect3">
<h4 id="_jschexception_auth_fail"><a class="link" href="#_jschexception_auth_fail">JSchException: Auth fail</a></h4>
<div class="paragraph">
<p>I got such an exception</p>
<p>You may get an exception similar to the following:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -830,7 +1072,7 @@ Caused by: com.jcraft.jsch.JSchException: Auth fail
</div>
</div>
<div class="paragraph">
<p>To fix that just call</p>
<p>To fix that just call, run the following commands before running the app:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -840,9 +1082,6 @@ $ eval `ssh-agent`
$ ssh-add ~/.ssh/id_rsa</code></pre>
</div>
</div>
<div class="paragraph">
<p>before running the app</p>
</div>
</div>
</div>
</div>