Skip to content

Commit 6ab7e4f

Browse files
committed
SWS-1055 - Perform releases through Concourse.
1 parent 140fd84 commit 6ab7e4f

8 files changed

+354
-183
lines changed

README.adoc

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -95,33 +95,6 @@ This will generate the artifacts.
9595

9696
You can also import the project into your IDE.
9797

98-
== Releasing Spring Web Services
99-
100-
Snapshots are published automatically via CI server by doing this:
101-
102-
----
103-
$ USERNAME=<username> PASSWORD=<encrypted password> ./mvnw -Pdistribute,snapshot,docs clean -Dmaven.test.skip=true deploy
104-
----
105-
106-
IMPORTANT: Snapshots do NOT include GPG signatures. To do so would require putting a private key on the CI server. The process for releases (below) is manual and DOES include GPG signatures.
107-
108-
To do a release (.RELEASE, .RC?, .M?):
109-
110-
. Check in all changes and ensure there are no edited files.
111-
. Bump up the version in ALL `pom.xml` files to the desired version (e.g. `mvn versions:set -DnewVersion=3.0.0.RC1`) and commit the change.
112-
. `git tag <version>` (like v3.0.0.RC1)
113-
. Execute a maven test (`./mvnw -Pdistribute,snapshot,docs clean test`).
114-
. Execute a maven deploy.
115-
* For a milestone: `USERNAME=<user> PASSWORD=<encrypted password> ./mvnw -Pdistribute,milestone,docs clean -Dmaven.test.skip=true deploy`
116-
* For a release: `USERNAME=<user> PASSWORD=<encrypted password> ./mvnw -Pdistribute,release,docs clean -Dmaven.test.skip=true deploy`
117-
* For a release to maven central: `USERNAME=<user> PASSWORD=<nexus password> ./mvnw -Pdistribute,gpg,central,docs clean -Dmaven.test.skip=true deploy -s settings.xml`
118-
. Bump up the version in ALL `pom.xml` files again to the next BUILD-SNAPSHOT.
119-
. Commit the change.
120-
. `git push` (This will push the tagged version along with the release AND the new snapshot commit)
121-
. Inspect handiwork at https://repo.spring.io/ or https://oss.sonatype.org/#stagingRepositories
122-
123-
NOTE: A word about reference documentation. Based upon https://github.com/spring-projects/spring-framework/wiki/gradle-build-and-release-faq#user-content-wiki-docs_schema_dist_publication[this], the `distribute` profile contains an artifactory property that is applied to the ZIP file generated by the `docs` profile. A CRON job will scoop up the zipped up docs and unpack them inside the target location.
124-
12598
== Code of Conduct
12699

127100
This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct].

ci/README.adoc

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,28 @@ WARNING: Do NOT check this file into source control! If you'll check, `credentia
2727
With this in place, run the following `fly` commands to create pipelines:
2828

2929
----
30-
% fly -t <team-name> sp -p spring-ws -c ci/pipeline-template.yml -l credentials.yml -v branch=master
31-
% fly -t <team-name> sp -p spring-ws-2.x -c ci/pipeline-template.yml -l credentials.yml -v branch=2.x
30+
% fly -t spring-team sp -p spring-ws -c ci/pipeline-template.yml -l credentials.yml -v branch=master -v release-branch=release
3231
----
3332

34-
This creates pipelines for:
33+
With these pipelines in place, you can now activate and expose them:
3534

36-
* Spring WS `master` branch
37-
* Spring WS `2.x` branch
35+
----
36+
% fly -t spring-team unpause-pipeline -p spring-ws
37+
% fly -t spring-team expose-pipeline -p spring-ws
38+
----
3839

39-
With these pipelines in place, you can now activate and expose them:
40+
=== Making a release
4041

42+
1. Create a new release (on the main branch).
43+
----
44+
% ci/create-release.sh <release version> <next snapshot version>
4145
----
42-
% fly -t <team-name> unpause-pipeline -p spring-ws
43-
% fly -t <team-name> expose-pipeline -p spring-ws
44-
% fly -t <team-name> unpause-pipeline -p spring-ws-2.x
45-
% fly -t <team-name> expose-pipeline -p spring-ws-2.x
46-
----
46+
47+
2. With the release tagged, push the tagged version to the release branch.
48+
----
49+
% git checkout -b release
50+
% git reset --hard <tag>
51+
% git push -f origin release
52+
----
53+
54+
NOTE: You can chain the previous set of commands together using `&&`.

ci/create-release.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
RELEASE=$1
6+
SNAPSHOT=$2
7+
8+
# Bump up the version in pom.xml to the desired version and commit the change
9+
./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false
10+
git add .
11+
git commit --message "Releasing Spring Web Services v$RELEASE"
12+
13+
# Tag the release
14+
git tag -s v$RELEASE -m "v$RELEASE"
15+
16+
# Bump up the version in pom.xml to the next snapshot
17+
./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false
18+
git add .
19+
git commit --message "Continue development on v$SNAPSHOT"
20+
21+

0 commit comments

Comments
 (0)