Skip to content

Commit a17bef1

Browse files
authored
Merge branch 'eclipse-platform:master' into master
2 parents 206b2b6 + 54d7f7c commit a17bef1

17 files changed

Lines changed: 71 additions & 59 deletions

File tree

JenkinsJobs/Builds/build.jenkinsfile

Lines changed: 7 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,9 @@ spec:
314316
}
315317
}
316318
steps {
317-
build job: 'Releng/PublishToMaven', parameters: [string(name: 'snapshotOrRelease', value: '-snapshot')], wait: false
319+
build job: 'Releng/deployToMaven', wait: false, parameters: [
320+
string(name: 'sourceRepository', value: "https://download.eclipse.org/eclipse/updates/${RELEASE_VER}-${BUILD_TYPE}-builds/${BUILD_IID}")
321+
]
318322
}
319323
}
320324
}

JenkinsJobs/Releng/FOLDER.groovy

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,50 +2,36 @@ folder('Releng') {
22
description('Jobs related to routine releng tasks. Some are periodic, some are "manual" jobs ran only when needed.')
33
}
44

5-
pipelineJob('Releng/PublishToMaven'){
6-
displayName('Publish to Maven')
5+
pipelineJob('Releng/deployToMaven'){
6+
displayName('Deploy to Maven')
77
description('''\
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
10-
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:
10+
with contents as specified by the <a href="https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/master/eclipse.platform.releng/deploy-to-maven/SDK4Mvn.aggr">SDK4Mvn.aggr</a> and
11+
then deploys 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>
15-
Snapshots are published to <a href="https://repo.eclipse.org/content/repositories/eclipse-snapshots/">https://repo.eclipse.org/content/repositories/eclipse-snapshots/</a>.
15+
Snapshots are deployed to <a href="https://repo.eclipse.org/content/repositories/eclipse-snapshots/">https://repo.eclipse.org/content/repositories/eclipse-snapshots/</a>.
1616
</li>
1717
<li>
18-
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>.
18+
Releases are deployed to <a href="https://repo1.maven.org/maven2/org/eclipse/">Maven central</a> by deploying to a <a href="https://oss.sonatype.org/#stagingRepositories">staging repository</a>.
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+
stringParam('sourceRepository', null, '''\
25+
The URL of the source P2 repository to be deployed.<br>
26+
To deploy a snapshot, 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>
27+
<b>To deploy a <em>Release</em>, the corresponding release repository should be specified</b>, e.g. 'https://download.eclipse.org/eclipse/updates/4.36/R-4.36-202505281830/'<br>
28+
If left blank (not recommended), the latest I-build is deployed.
4329
<ul>
4430
<li>
45-
Snapshots are published to <a href="https://repo.eclipse.org/content/repositories/eclipse-snapshots/">https://repo.eclipse.org/content/repositories/eclipse-snapshots/</a>.
31+
Snapshots are deployed to <a href="https://repo.eclipse.org/content/repositories/eclipse-snapshots/">https://repo.eclipse.org/content/repositories/eclipse-snapshots/</a>.
4632
</li>
4733
<li>
48-
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>.
34+
Releases are deployed to <a href="https://repo1.maven.org/maven2/org/eclipse/">Maven central</a> by deploying to a <a href="https://oss.sonatype.org/#stagingRepositories">staging repository</a>.
4935
</li>
5036
</ul>
5137
''')
@@ -56,7 +42,7 @@ Releases are published to <a href="https://repo1.maven.org/maven2/org/eclipse/">
5642
scm {
5743
github('eclipse-platform/eclipse.platform.releng.aggregator', 'master')
5844
}
59-
scriptPath('JenkinsJobs/Releng/publishToMaven.jenkinsfile')
45+
scriptPath('JenkinsJobs/Releng/deployToMaven.jenkinsfile')
6046
}
6147
}
6248
}

JenkinsJobs/Releng/publishToMaven.jenkinsfile renamed to JenkinsJobs/Releng/deployToMaven.jenkinsfile

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ pipeline {
1414
maven 'maven-daemon'
1515
}
1616
environment {
17+
DEPLOYMENT_TYPE = determineDeploymentType()
1718
REPO = "${WORKSPACE}/repo"
1819
CBI_AGGR = "${installLatestCbiAggr()}"
1920
// Folder ~/.m2 is not writable for builds, ensure mvnd metadata are written within the workspace.
@@ -24,11 +25,15 @@ pipeline {
2425
stages {
2526
stage('Aggregate Maven repository') {
2627
steps {
27-
sh '''#!/bin/bash -e
28-
FILE_SDK_AGGR="${WORKSPACE}/git-repo/eclipse.platform.releng/publish-to-maven-central/SDK4Mvn.aggr"
28+
sh '''#!/bin/bash -xe
29+
FILE_SDK_AGGR="${WORKSPACE}/git-repo/eclipse.platform.releng/deploy-to-maven/SDK4Mvn.aggr"
2930

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

@@ -45,6 +50,7 @@ pipeline {
4550

4651
pushd ${REPO}
4752

53+
set +x
4854
echo "========== Repo aggregation completed ========="
4955

5056
# Find all the artifact folders for all projects
@@ -65,7 +71,7 @@ pipeline {
6571
}
6672
}
6773
stage('Validate repository') {
68-
// Tests that each to-be-published artifact can transitively resolve all its dependencies.
74+
// Tests that each to-be deployed artifact can transitively resolve all its dependencies.
6975
steps {
7076
dir('repo-validation') { // Do the work in a clean folder without a pom.xml
7177
sh '''#!/bin/bash -xe
@@ -77,7 +83,7 @@ pipeline {
7783
}
7884
}
7985
}
80-
stage('Publish artifacts to Maven-Central') {
86+
stage('Deploy artifacts') {
8187
matrix {
8288
axes {
8389
axis { // environment variable is also used by called scripts!
@@ -86,7 +92,7 @@ pipeline {
8692
}
8793
}
8894
stages {
89-
stage('Publish project to Maven'){
95+
stage('Deploy project to Maven'){
9096
environment {
9197
SETTINGS = "/home/jenkins/.m2/settings-deploy-ossrh-${PROJECT == 'platform' ? 'releng': PROJECT}.xml"
9298
// The location of the temporarily file that contains the secret file content
@@ -95,7 +101,7 @@ pipeline {
95101
MAVEN_GPG_PASSPHRASE = credentials("secret-subkeys-${PROJECT == 'platform' ? 'releng': PROJECT}.asc-passphrase")
96102
}
97103
steps {
98-
dir("publish-${PROJECT}"){
104+
dir("deploy-${PROJECT}"){
99105
sh '''#!/bin/sh -xe
100106
# Copy configuration pom into clean directory to stop maven from finding the .mvn folder of this git-repository
101107
cp "${WORKSPACE}/git-repo/eclipse-platform-parent/pom.xml" eclipse-parent-pom.xml
@@ -134,15 +140,15 @@ pipeline {
134140
SOURCES_ARG="-Dsources=${sourcesFile}"
135141
else
136142
SOURCES_ARG=""
137-
echo "No ${sourcesFile}."
143+
echo "Missing sources file ${sourcesFile}."
138144
fi
139145

140146
if [ -f "${javadocFile}" ]; then
141147
echo "${javadocFile}"
142148
JAVADOC_ARG="-Djavadoc=${javadocFile}"
143149
else
144150
JAVADOC_ARG=""
145-
echo "No ${javadocFile}."
151+
echo "Missing JavaDoc file ${javadocFile}."
146152
fi
147153
set -x
148154

@@ -175,6 +181,15 @@ pipeline {
175181
}
176182
}
177183

184+
def determineDeploymentType() {
185+
if ("${sourceRepository}".trim() =~ /\/(?<version>\d+\.\d+)\/R-\k<version>(\.\d+)?-\d{12}(\/)?$/) {
186+
input message: 'The specified P2 repository is a release and will be deployed to Maven-Central.', ok : 'Proceed deploying to Maven-Central'
187+
return 'release'
188+
} else {
189+
return 'snapshot'
190+
}
191+
}
192+
178193
def installLatestCbiAggr(){
179194
return install('cbiAggr', "https://download.eclipse.org/cbi/updates/p2-aggregator/products/nightly/latest/org.eclipse.cbi.p2repo.cli.product-linux.gtk.x86_64.tar.gz") + '/cbiAggr'
180195
}

RELEASE.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,11 @@ The actual steps to release
108108
- Change the DL_TYPE from S to R.
109109
- TAG will be set to R as well, for example `R4_27`
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.
111-
* #### **Publish to Maven central**
112-
- 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.
116-
- Once that publish job has completed successfully, log into https://oss.sonatype.org/#stagingRepositories and close the Platform, JDT and PDE repositories.
111+
* #### **Deploy to Maven central**
112+
- Deploying 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+
- Run the [Deploy to Maven](https://ci.eclipse.org/releng/job/Releng/job/deployToMaven/) job in Jenkins with the release build as `sourceRepository`.
114+
- About a minute after triggering the job, Jenkins will ask for confirmation on the console, if the specified build should really be deployed to Maven-Central staging.
115+
- Once that deploy-job has completed successfully, log into https://oss.sonatype.org/#stagingRepositories and close the Platform, JDT and PDE repositories.
117116
- 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.
118117
* **Contribute to SimRel**
119118
- If SimRel is not updated before the I-builds are cleaned up (specifically the build for RC2/GA) it will break.
@@ -136,8 +135,6 @@ The release is scheduled for 10AM EST. Typically the jobs are scheduled beforeha
136135
- For the Y and P build parameters it's important to know whether or not Y and P builds were run during the release. Since they correspond to java releases on a 6 month cycle, typically they are built in odd-numbered releases.
137136
The existing builds are kept for one release, then cleaned up before the next stream that will have Y and P builds. it's convoluted and I dont want to type it out. Remove Y builds on even releases.
138137
- If something doesn't get cleaned up properly you can use Use the [list artifacts](https://ci.eclipse.org/releng/view/Cleanup/job/list_artifacts_from_download_server/) job to generate ta list of what's on the download server and either create a new job to clean it up or update and rerun the cleanup job as appropriate.
139-
* **Set Maven to Publish to I-builds**
140-
- Update [SDK4Mvn.aggr](https://github.com/eclipse-platform/eclipse.platform.releng/blob/master/publish-to-maven-central/SDK4Mvn.aggr) and point it to the new streams I-builds.
141138
* **Set Previous Release to GA**
142139
- Everything that was updated to RC2 (see below) should now use the released build.
143140

RELENG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Adding a job to Jenkins should be as easy as adding a new groovy file to git, bu
2929

3030
* **No dashes in filenames**, it breaks JobDSL. If there was a `-` in the job name I changed it to `_` in the file name.
3131
* **Job Names**
32-
- No spaces, this is just for the good of scripts etc. The job NAME is used in the url, but you can always add a `displayName` field if you want the job to appear with a more natural looking name on the page. See (Releng/PublishToMaven)[JenkinsJobs/Releng/FOLDER.groovy] as an example.
32+
- No spaces, this is just for the good of scripts etc. The job NAME is used in the url, but you can always add a `displayName` field if you want the job to appear with a more natural looking name on the page. See (Releng/deployToMaven)[JenkinsJobs/Releng/FOLDER.groovy] as an example.
3333
- The folder needs to be part of the job name, otherwise Jenkins will just create the job at the dashboard level.
3434
* **job vs pipelineJob**
3535
- Anything that can build on a regular jenkins node or via an available lable uses the (job)[https://jenkinsci.github.io/job-dsl-plugin/#path/job] template.

eclipse-platform-parent/pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,13 +553,23 @@
553553
<cleanup.remove_unnecessary_array_creation>true</cleanup.remove_unnecessary_array_creation>
554554
<!-- Remove unnecessary suppress warning tokens -->
555555
<cleanup.remove_unnecessary_suppress_warnings>true</cleanup.remove_unnecessary_suppress_warnings>
556-
<!-- Remove unnecessary whitespace-->
556+
<!-- Remove unnecessary whitespace-->
557557
<cleanup.remove_trailing_whitespaces>true</cleanup.remove_trailing_whitespaces>
558558
<cleanup.remove_trailing_whitespaces_all>true</cleanup.remove_trailing_whitespaces_all>
559559
<cleanup.remove_trailing_whitespaces_ignore_empty>false</cleanup.remove_trailing_whitespaces_ignore_empty>
560560
<!-- Removes unused imports -->
561561
<cleanup.remove_unused_imports>true</cleanup.remove_unused_imports>
562562
<cleanup.organize_imports>false</cleanup.organize_imports>
563+
<!-- Remove unused private members -->
564+
<cleanup.remove_unused_private_members>true</cleanup.remove_unused_private_members>
565+
<!-- Remove unused private types -->
566+
<cleanup.remove_unused_private_types>true</cleanup.remove_unused_private_types>
567+
<!-- Remove unused private constructors -->
568+
<cleanup.remove_private_constructors>true</cleanup.remove_private_constructors>
569+
<!-- Remove unused private fields -->
570+
<cleanup.remove_unused_private_fields>true</cleanup.remove_unused_private_fields>
571+
<!-- Remove unused private methods -->
572+
<cleanup.remove_unused_private_methods>true</cleanup.remove_unused_private_methods>
563573
</cleanUpProfile>
564574
</configuration>
565575
</execution>

eclipse.platform

Submodule eclipse.platform updated 31 files

eclipse.platform.releng/publish-to-maven-central/.project renamed to eclipse.platform.releng/deploy-to-maven/.project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<projectDescription>
3-
<name>publish-to-maven-central</name>
3+
<name>deploy-to-maven</name>
44
<comment></comment>
55
<projects>
66
</projects>

0 commit comments

Comments
 (0)