Skip to content

Commit aa5eff3

Browse files
committed
Perform build and distribute on CI.
See #21
1 parent b2a2c7b commit aa5eff3

File tree

7 files changed

+22
-32
lines changed

7 files changed

+22
-32
lines changed

Jenkinsfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,27 @@ pipeline {
5959
steps {
6060
script {
6161
sh "ci/build-spring-data-release-cli.bash"
62-
sh "ci/prepare-and-build.bash ${p['release.version']}"
62+
// sh "ci/prepare-and-build.bash ${p['release.version']}"
6363

64-
slackSend(
64+
/*slackSend(
6565
color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger',
6666
channel: '#spring-data-dev',
6767
message: (currentBuild.currentResult == 'SUCCESS')
6868
? "`${env.BUILD_URL}` - Build and deploy passed! Conduct smoke tests then report back here."
6969
: "`${env.BUILD_URL}` - Push and distribute failed!")
7070
7171
input("SMOKE TEST: Did the smoke tests for ${p['release.version']} pass? Accept to conclude and distribute the release.")
72+
*/
7273

73-
sh "ci/conclude.bash ${p['release.version']}"
74-
sh "ci/push-and-distribute.bash ${p['release.version']}"
74+
// sh "ci/conclude.bash ${p['release.version']}"
75+
sh "ci/build-and-distribute.bash ${p['release.version']}"
7576

7677
slackSend(
7778
color: (currentBuild.currentResult == 'SUCCESS') ? 'good' : 'danger',
7879
channel: '#spring-data-dev',
7980
message: (currentBuild.currentResult == 'SUCCESS')
80-
? "`${env.BUILD_URL}` - Push and distribute ${p['release.version']} passed! Release the build (if needed)."
81-
: "`${env.BUILD_URL}` - Push and distribute ${p['release.version']} failed!")
81+
? "`${env.BUILD_URL}` - Build and distribute ${p['release.version']} passed! Release the build (if needed)."
82+
: "`${env.BUILD_URL}` - Build and distribute ${p['release.version']} failed!")
8283
}
8384
}
8485
}

ci/push-and-distribute.bash renamed to ci/build-and-distribute.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
set -euo pipefail
44

55
VERSION=$1
6-
echo "You want me to push and distribute ${VERSION} ??"
6+
echo "You want me to build and distribute ${VERSION} ?"
77

88
export MAVEN_HOME="$HOME/.sdkman/candidates/maven/current"
99
export JAVA_HOME="$HOME/.sdkman/candidates/java/current"

ci/build-and-distribute.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
workspace cleanup
2+
release build ${VERSION}
3+
release distribute ${VERSION}

ci/push-and-distribute.template

Lines changed: 0 additions & 2 deletions
This file was deleted.

readme.adoc

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ The <<build,*Build and publish the release*>> phase is what's covered by the CI
1717
. Upgrade dependencies in Spring Data Build parent pom (mind minor/major version rules).
1818
. All release tickets are present (CLI: `$ tracker releasetickets $trainIteration`)
1919
. Review open tickets for release.
20-
. Self-assign release tickets (CLI: `$ tracker prepare $trainIteration`)
20+
. Self-assign release tickets (CLI: `$ tracker prepare $trainIteration`)
2121
. Announce release preparations to mailing list (https://groups.google.com/forum/#!forum/spring-data-dev)
22-
. 🚥 Continue with `Build and publish the release`
22+
. Create release tag, verify the release can be built, and publish tags (CLI: `$ prepare-it $trainIteration`)
23+
. 🚥 Continue with `Build and distribute the release`
2324

2425
[[build]]
25-
=== 🌿 Build and publish the release
26+
=== 🌿 Build and distribute the release
2627

2728
[%header,cols="1,1"]
2829
|===
@@ -56,27 +57,12 @@ A job should have started. Click on the active job, and then click on *Open Blue
5657

5758
|===
5859

59-
After preparing and building (approx. 20 minutes), the Jenkins pipeline will pause, indicating it's time to smoke test the staged release, and put up a prompt: *Proceed* or *Abort*.
60-
61-
🚨 If you click on *Proceed*, then it will continue on to the `release conclude`/`github push`/`release distribute` phase.
62-
6360
* For a Maven central release, go to https://s01.oss.sonatype.org/ and login.
6461
** After logging in, you will find a closed Spring Data Release repository.
6562
** Click the repository and then choose "Release".
6663
* For an artifactory release, the release will already have been staged and promoted, so there is nothing more to do.
6764
* 🚥 Continue with `Post-release tasks`
6865

69-
*Background*
70-
====
71-
The first CI phase includes: `release prepare` and `release build` and may take twenty minutes or so.
72-
73-
* For a maven central release, you can visit https://s01.oss.sonatype.org/, login, and inspect the staged Spring Data Release. All the Spring Data modules will inside one repository.
74-
* For a milestone/RC release, you can visit https://repo.spring.io/. All the Spring Data modules will be there, each module a separate "build".
75-
76-
At this point in time, we don't have official Spring Data Release smoke testing configured, so you can simply click *Proceed* if there were no issues. +
77-
For milestone/RC releases, Spring Data Release tools automatically promotes them in Artifactory, so if you have to delete a build, you'll ALSO have to go and delete each module individually.
78-
====
79-
8066
[[post-release]]
8167
=== 🍀 Post-Release tasks
8268

@@ -149,13 +135,14 @@ See `application-local.template` for details.
149135

150136
|All release tickets are present |`$ tracker releasetickets $trainIteration`
151137
|Self-assign release tickets |`$ tracker prepare $trainIteration`
152-
2+| *Release the binaries*
138+
2+| *Prepare the release*
153139
| |`$ release prepare $trainIteration`
154-
|Build the artefacts and push them to the appropriate maven repository |`$ release build $trainIteration`
155140
| |`$ release conclude $trainIteration`
141+
2+| *Build the release*
142+
|Build the artifacts from tag and push them to the appropriate maven repository |`$ release build $trainIteration`
143+
|Distribute documentation and static resources from tag |`$ release distribute $trainIteration`
156144
|Push the created commits to GitHub |`$ github push $trainIteration`
157145
|Push new maintenance branches if the release version was a GA release (`X.Y.0` version) |`$ git push $trainIteration.next`
158-
|Distribute documentation and static resources from tag |`$ release distribute $trainIteration`
159146
2+| *Post-release tasks*
160147
|Close JIRA tickets and GitHub release tickets. |`$ tracker close $trainIteration`
161148
|Create new release versions and tickets for upcoming version |`$ tracker setup-next $trainIteration.next`

src/main/java/org/springframework/data/release/build/MavenBuildSystem.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ public void close(StagingRepository stagingRepository) {
241241
public <M extends ProjectAware> M triggerBuild(M module) {
242242

243243
CommandLine arguments = CommandLine.of(Goal.CLEAN, Goal.INSTALL)//
244-
.andIf(module.getProject().skipTests(), SKIP_TESTS);
244+
.and(profile("ci,release")).andIf(module.getProject().skipTests(), SKIP_TESTS)
245+
.andIf(!ObjectUtils.isEmpty(properties.getSettingsXml()), settingsXml(properties.getSettingsXml()));
245246

246247
mvn.execute(module.getProject(), arguments);
247248

src/main/java/org/springframework/data/release/model/Project.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class Project implements Comparable<Project> {
5050
}
5151

5252
private Project(String key, String name, String fullName, Tracker tracker) {
53-
this(new ProjectKey(key), name, fullName, Collections.emptySet(), tracker, ArtifactCoordinates.SPRING_DATA, false);
53+
this(new ProjectKey(key), name, fullName, Collections.emptySet(), tracker, ArtifactCoordinates.SPRING_DATA, true);
5454
}
5555

5656
@java.beans.ConstructorProperties({ "key", "name", "fullName", "dependencies", "tracker", "additionalArtifacts",

0 commit comments

Comments
 (0)