Skip to content

Commit a2a5ba7

Browse files
committed
[RelEng] Specify P2 repository to publish to Maven as job parameter
instead of changing the SDK4Mvn.aggr files to just run the publication job subsequently and then changing it again to the next release cycle's I-build repository. This avoids the described changes and simplifies the release process.
1 parent b7dc3cb commit a2a5ba7

File tree

5 files changed

+26
-30
lines changed

5 files changed

+26
-30
lines changed

JenkinsJobs/Builds/build.jenkinsfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,10 +298,12 @@ spec:
298298
steps {
299299
script {
300300
for (c in BUILD.testConfigurations) {
301-
build job: "${BUILD.testJobFolder}/${BUILD.testPrefix}-${c.os}-${c.arch}-java${c.javaVersion}", parameters: [string(name: 'buildId', value: "${BUILD_IID}")], wait: false
301+
build job: "${BUILD.testJobFolder}/${BUILD.testPrefix}-${c.os}-${c.arch}-java${c.javaVersion}", wait: false, parameters: [
302+
string(name: 'buildId', value: "${BUILD_IID}")
303+
]
302304
}
303305
}
304-
build job: 'SmokeTests/Start-smoke-tests', parameters: [string(name: 'buildId', value: "${BUILD_IID}")], wait: false
306+
build job: 'SmokeTests/Start-smoke-tests', wait: false, parameters: [string(name: 'buildId', value: "${BUILD_IID}")]
305307
}
306308
}
307309
stage('Trigger publication to Maven snapshots repo') {
@@ -314,7 +316,10 @@ spec:
314316
}
315317
}
316318
steps {
317-
build job: 'Releng/PublishToMaven', parameters: [string(name: 'snapshotOrRelease', value: '-snapshot')], wait: false
319+
build job: 'Releng/PublishToMaven', wait: false, parameters: [
320+
string(name: 'snapshotOrRelease', value: 'snapshot'),
321+
string(name: 'sourceRepository', value: "https://download.eclipse.org/eclipse/updates/${RELEASE_VER}-${BUILD_TYPE}-builds/${BUILD_IID}")
322+
]
318323
}
319324
}
320325
}

JenkinsJobs/Releng/FOLDER.groovy

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pipelineJob('Releng/PublishToMaven'){
88
<p>
99
This job uses the <a href="https://github.com/eclipse-cbi/p2repo-aggregator">CBI aggregator</a> to produce a Maven-compatible repository
1010
with contents as specified by the <a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/master/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr">SDK4Mvn.aggr</a> and
11-
then publishes the artifacts for <code>Eclipse-Platform</code>, <code>JDT</code> and <code>PDE</code> from the output:
11+
then publishes the artifacts for <code>Eclipse-Platform</code>, <code>JDT</code>, <code>Equinox</code> and <code>PDE</code> from the output:
1212
</p>
1313
<ul>
1414
<li>
@@ -19,27 +19,10 @@ Releases are published to <a href="https://repo1.maven.org/maven2/org/eclipse/">
1919
</li>
2020
</ul>
2121
<p>
22-
The source repository to be published is specified via the
23-
<a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/b6c45b1b38b74ad1fa7955e996976da4c259f926/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr#L5">local</a> and
24-
<a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/b6c45b1b38b74ad1fa7955e996976da4c259f926/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr#L8">remote</a> repository locations.
25-
<b>
26-
For a release build, these should specify the release repository location.
27-
After the release, these should specify the current 4.x-I-Builds.
28-
</b>
29-
</p>
3022
''')
3123
parameters { // Define parameters in job configuration to make them available even for the very first build after this job was (re)created.
32-
choiceParam('snapshotOrRelease', ['-snapshot' /*default*/, '-release'], '''\
33-
<p>
34-
The source repository to be published is specified via the
35-
<a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/b6c45b1b38b74ad1fa7955e996976da4c259f926/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr#L5">local</a> and
36-
<a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/b6c45b1b38b74ad1fa7955e996976da4c259f926/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr#L8">remote</a> repository locations
37-
the <a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/master/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr">SDK4Mvn.aggr</a>.
38-
<b>
39-
For a release build, these should specify the release repository location.
40-
After the release, these should specify the current 4.x-I-Builds.
41-
</b>
42-
</p>
24+
choiceParam('snapshotOrRelease', ['snapshot' /*default*/, 'release'], '''\
25+
If this is the publication of a snapshot or a release build.
4326
<ul>
4427
<li>
4528
Snapshots are published to <a href="https://repo.eclipse.org/content/repositories/eclipse-snapshots/">https://repo.eclipse.org/content/repositories/eclipse-snapshots/</a>.
@@ -48,6 +31,12 @@ Snapshots are published to <a href="https://repo.eclipse.org/content/repositorie
4831
Releases are published to <a href="https://repo1.maven.org/maven2/org/eclipse/">Maven central</a> by publishing to a <a href="https://oss.sonatype.org/#stagingRepositories">staging repository</a>.
4932
</li>
5033
</ul>
34+
''')
35+
stringParam('sourceRepository', null, '''\
36+
The URL of the source P2 repository to be published.<br>
37+
<b>If this is a <em>release</em> publication, the corresponding release repository should be specified</b>, e.g. 'https://download.eclipse.org/eclipse/updates/4.36/R-4.36-202505281830/'<br>
38+
For a snapshot publication, the 4.x-I-Builds child repository of the specific build should be specified, e.g. 'https://download.eclipse.org/eclipse/updates/4.37-I-builds/I20250710-1800/'<br>
39+
If left blank (not recommended), the latest I-build is published.
5140
''')
5241
}
5342
definition {

JenkinsJobs/Releng/publishToMaven.jenkinsfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ pipeline {
2727
sh '''#!/bin/bash -e
2828
FILE_SDK_AGGR="${WORKSPACE}/git-repo/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr"
2929

30+
# Set the specified source repository
31+
if [ -n "${sourceRepository}" ]; then
32+
sed -e "s|<repositories location=\\".*\\">|<repositories location=\\"${sourceRepository}\\">|" -i ${FILE_SDK_AGGR}
33+
fi
3034
# Set whether this is a snapshot build or not
31-
if [ "${snapshotOrRelease}" = "-snapshot" ]; then
35+
if [ "${snapshotOrRelease}" != 'release' ]; then
3236
sed -e 's/snapshot=".*"/snapshot="true"/g' -i ${FILE_SDK_AGGR}
3337
fi
3438

@@ -134,15 +138,15 @@ pipeline {
134138
SOURCES_ARG="-Dsources=${sourcesFile}"
135139
else
136140
SOURCES_ARG=""
137-
echo "No ${sourcesFile}."
141+
echo "Missing sources file ${sourcesFile}."
138142
fi
139143

140144
if [ -f "${javadocFile}" ]; then
141145
echo "${javadocFile}"
142146
JAVADOC_ARG="-Djavadoc=${javadocFile}"
143147
else
144148
JAVADOC_ARG=""
145-
echo "No ${javadocFile}."
149+
echo "Missing JavaDoc file ${javadocFile}."
146150
fi
147151
set -x
148152

RELEASE.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@ The actual steps to release
110110
- You can subscribe to [cross-project-issues](https://accounts.eclipse.org/mailing-list/cross-project-issues-dev) to get the notifications on Simrel releases.
111111
* #### **Publish to Maven central**
112112
- Publishing to maven should happen by at least Tuesday before the release since there is up to a 24 hour delay for the maven mirrors.
113-
- Update [SDK4Mvn.aggr](https://github.com/eclipse-platform/eclipse.platform.releng/blob/master/publish-to-maven-central/SDK4Mvn.aggr) to the release build.
114-
- SDK4Mvn.aggr determines what is being published to Maven
115-
- Run the [Publish to Maven](https://ci.eclipse.org/releng/job/Releng/job/PublishToMaven/) job in jenkins with the `-release` parameter.
113+
- Run the [Publish to Maven](https://ci.eclipse.org/releng/job/Releng/job/PublishToMaven/) job in jenkins with the `release` parameter and the release build as `sourceRepository`.
116114
- Once that publish job has completed successfully, log into https://oss.sonatype.org/#stagingRepositories and close the Platform, JDT and PDE repositories.
117115
- If you do not have an account on oss.sonatype.org for performing the rest of the release request one by creating an issue like https://issues.sonatype.org/browse/OSSRH-43870 to get permissions for platform, JDT and PDE projects and tag an existing release engineer to give approval.
118116
* **Contribute to SimRel**

eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<aggregator:Aggregation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:aggregator="http://www.eclipse.org/cbi/p2repo/2011/aggregator/1.1.0" label="SDK4Mvn" packedStrategy="UNPACK_AS_SIBLING" type="R" mavenResult="true" versionFormat="MavenRelease" includeSources="true" excludeFeatures="true" includedIUPattern="org\.eclipse(?!\.(emf|jetty|ecf|orbit)).*" validateNexusPublishingRequirements="true">
33
<validationSets label="main">
44
<contributions label="sdk_http">
5-
<repositories location="https://download.eclipse.org/eclipse/updates/4.37-I-builds">
5+
<repositories location="https://download.eclipse.org/eclipse/updates/I-builds">
66
<bundles name="org.eclipse.equinox.slf4j"/>
77
<features name="org.eclipse.equinox.p2.sdk.feature.group"/>
88
<features name="org.eclipse.equinox.p2.discovery.feature.feature.group"/>

0 commit comments

Comments
 (0)