Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit 38e8ce3

Browse files
committed
Polish 2.0.x pipeline.
1 parent 7c29745 commit 38e8ce3

File tree

4 files changed

+38
-71
lines changed

4 files changed

+38
-71
lines changed

README.adoc

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -69,43 +69,6 @@ This will generate the artifact.
6969

7070
You can also import the project into your IDE.
7171

72-
== Releasing Spring Session MongoDB
73-
74-
To do a release (.RELEASE, .RC?, .M?):
75-
76-
. Check in all changes and ensure there are no edited files.
77-
. Run `ci/create-release-2.0.x.sh <release version> <snapshot version>` e.g. (`ci/create-release-2.0.x.sh 2.1.1.RELEASE 2.1.2.BUILD-SNAPSHOT`)
78-
79-
From here, test things out locally.
80-
81-
. `git checkout release-2.0.x`
82-
. `./mvnw clean package`
83-
. ...do all your testing...
84-
85-
Once verified, push the `release-2.0.x` branch to `origin` and let the CI server deploy it.
86-
87-
. `git push`
88-
89-
After a clean release, switch back to 2.0.x branch and push it.
90-
91-
. `git checkout 2.0.x`
92-
. `git push`
93-
. `git push --tags`
94-
95-
//To deploy your changes:
96-
//
97-
//. `git checkout release`
98-
//. Execute a maven deploy.
99-
//* For a milestone: `USERNAME=<user> PASSWORD=<encrypted password> ./mvnw -Pdistribute,milestone,docs clean deploy`
100-
//* For a release: `USERNAME=<user> PASSWORD=<encrypted password> ./mvnw -Pdistribute,release,docs clean deploy`
101-
//* For a release to maven central: `USERNAME=<user> PASSWORD=<nexus password> ./mvnw -Pdistribute,gpg,central clean deploy -s settings.xml` (At SonaType, *close* and *releases*)
102-
//. Inspect handiwork at https://repo.spring.io/ or https://oss.sonatype.org/#stagingRepositories
103-
104-
105-
CI server should build the new snapshot and automatically deploy to artifactory.
106-
107-
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.
108-
10972
== Code of Conduct
11073
This project adheres to the Contributor Covenant link:CODE_OF_CONDUCT.adoc[code of conduct].
11174
By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].

ci/README.adoc

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

3030
----
31-
% fly -t spring-team sp -p spring-session-data-mongodb -c ci/pipeline-template.yml -l credentials.yml -v branch=master -v release-branch=release
3231
% fly -t spring-team sp -p spring-session-data-mongodb-2.0.x -c ci/pipeline-template.yml -l credentials.yml -v branch=2.0.x -v release-branch=release-2.0.x
3332
----
3433

35-
This creates pipelines for:
36-
37-
* Spring Session for MongoDB `master` branch
38-
* Spring Session for MongoDB `2.0.x` branch
39-
4034
With these pipelines in place, you can now activate and expose them:
4135

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

ci/create-release.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,15 @@ set -euo pipefail
55
RELEASE=$1
66
SNAPSHOT=$2
77

8-
git branch -f release
9-
git checkout release
10-
118
# Bump up the version in pom.xml to the desired version and commit the change
129
./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false
1310
git add .
14-
git commit --message "Releasing Spring Session MongoDB v$RELEASE"
11+
git commit --message "Releasing Spring Session for MongoDB v$RELEASE"
1512

1613
# Tag the release
1714
git tag -s v$RELEASE -m "v$RELEASE"
1815

1916
# Bump up the version in pom.xml to the next snapshot
20-
git checkout master
2117
./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false
2218
git add .
2319
git commit --message "Continue development on v$SNAPSHOT"

ci/pipeline-template.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ resources:
4848
uri: https://repo.spring.io
4949
username: ((artifactory-username))
5050
password: ((artifactory-password))
51-
build_name: spring-session-data-mongodb
51+
build_name: spring-session-data-mongodb-2.x
5252

5353
- name: spring-session-data-mongodb-pull-requests
5454
type: pull-request
@@ -106,8 +106,8 @@ jobs:
106106
- task: test
107107
file: spring-session-data-mongodb-github/ci/test.yml
108108
params: { PROFILE: "convergence" }
109-
<<: *slack-success
110-
<<: *slack-failure
109+
<<: *slack-test-success
110+
<<: *slack-test-failure
111111

112112
- name: Test - JDK 8 and Spring.NEXT
113113
serial: true
@@ -120,8 +120,8 @@ jobs:
120120
- task: test
121121
file: spring-session-data-mongodb-github/ci/test.yml
122122
params: { PROFILE: "spring5-next,convergence" }
123-
<<: *slack-success
124-
<<: *slack-failure
123+
<<: *slack-test-success
124+
<<: *slack-test-failure
125125

126126
- name: Test - JDK 8 and Spring.NEXT 5.1
127127
serial: true
@@ -134,8 +134,8 @@ jobs:
134134
- task: test
135135
file: spring-session-data-mongodb-github/ci/test.yml
136136
params: { PROFILE: "spring51-next,convergence" }
137-
<<: *slack-success
138-
<<: *slack-failure
137+
<<: *slack-test-success
138+
<<: *slack-test-failure
139139

140140
- name: Test - JDK 11
141141
serial: true
@@ -149,8 +149,8 @@ jobs:
149149
image: openjdk:11-jdk
150150
file: spring-session-data-mongodb-github/ci/test.yml
151151
params: { PROFILE: "convergence" }
152-
<<: *slack-success
153-
<<: *slack-failure
152+
<<: *slack-test-success
153+
<<: *slack-test-failure
154154

155155
- name: Test - JDK 11 and Spring.NEXT
156156
serial: true
@@ -164,8 +164,8 @@ jobs:
164164
image: openjdk:11-jdk
165165
file: spring-session-data-mongodb-github/ci/test.yml
166166
params: { PROFILE: "spring5-next,convergence" }
167-
<<: *slack-success
168-
<<: *slack-failure
167+
<<: *slack-test-success
168+
<<: *slack-test-failure
169169

170170
- name: Test - JDK 11 and Spring.NEXT 5.1
171171
serial: true
@@ -179,8 +179,8 @@ jobs:
179179
image: openjdk:11-jdk
180180
file: spring-session-data-mongodb-github/ci/test.yml
181181
params: { PROFILE: "spring51-next,convergence" }
182-
<<: *slack-success
183-
<<: *slack-failure
182+
<<: *slack-test-success
183+
<<: *slack-test-failure
184184

185185
- name: Build
186186
serial: true
@@ -213,8 +213,8 @@ jobs:
213213
- "/**"
214214
properties:
215215
zip.deployed: false
216-
zip.displayname: "Spring Session Data MongoDB"
217-
zip.name: "spring-session-data-mongodb"
216+
zip.displayname: "spring-session-data-mongodb-2.x"
217+
zip.name: "spring-session-data-mongodb-2.x"
218218
zip.type: "docs"
219219
on_failure:
220220
aggregate:
@@ -332,8 +332,8 @@ jobs:
332332
- "/**"
333333
properties:
334334
zip.deployed: false
335-
zip.displayname: "Spring Session Data MongoDB"
336-
zip.name: "spring-session-data-mongodb"
335+
zip.displayname: "spring-session-data-mongodb-2.x"
336+
zip.name: "spring-session-data-mongodb-2.x"
337337
zip.type: "docs"
338338
on_failure:
339339
aggregate:
@@ -456,7 +456,7 @@ jobs:
456456
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
457457
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
458458

459-
slack-failure: &slack-failure
459+
slack-test-failure: &slack-test-failure
460460
on_failure:
461461
put: slack
462462
params:
@@ -467,7 +467,7 @@ slack-failure: &slack-failure
467467
title: "$BUILD_PIPELINE_NAME/$BUILD_JOB_NAME #$BUILD_NAME"
468468
title_link: $ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME
469469

470-
slack-success: &slack-success
470+
slack-test-success: &slack-test-success
471471
on_success:
472472
put: slack
473473
params:

0 commit comments

Comments
 (0)