Skip to content

Commit 08c08cb

Browse files
authored
Merge branch 'eclipse-platform:master' into master
2 parents 458976c + 1016e0c commit 08c08cb

26 files changed

Lines changed: 234 additions & 451 deletions

File tree

.github/workflows/checkDependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on:
2828
description: 'The version of Maven set up'
2929
type: string
3030
required: false
31-
default: '3.9.10'
31+
default: '3.9.11'
3232
secrets:
3333
token:
3434
description: Personal Access Token to use for creating pull-requests

.github/workflows/checkVersions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
- name: Set up Maven
6262
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
6363
with:
64-
maven-version: 3.9.10
64+
maven-version: 3.9.11
6565

6666
- name: Additional setup
6767
if: inputs.extra-setup-command

.github/workflows/cleanCode.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
###############################################################################
2+
# Copyright (c) 2025 Contributors to Eclipse Foundation
3+
#
4+
# This program and the accompanying materials are made available under the
5+
# terms of the Eclipse Public License 2.0 which is available at
6+
# https://www.eclipse.org/legal/epl-2.0/.
7+
#
8+
# SPDX-License-Identifier: EPL-2.0
9+
#
10+
# Contributors:
11+
# see git history
12+
###############################################################################
113
name: Automatic Code Cleanups
214
on:
315
workflow_call:
@@ -26,6 +38,11 @@ on:
2638
required: false
2739
default: false
2840
type: boolean
41+
branch:
42+
description: 'The branch to clean'
43+
type: string
44+
required: false
45+
default: 'master'
2946
submodules:
3047
description: |
3148
Whether to checkout submodules: `true` to checkout submodules or `recursive` to recursively checkout submodules.
@@ -38,7 +55,7 @@ on:
3855
description: 'The version of Maven set up'
3956
type: string
4057
required: false
41-
default: '3.9.10'
58+
default: '3.9.11'
4259
secrets:
4360
token:
4461
description: Personal Access Token to use for creating pull-requests
@@ -53,7 +70,7 @@ jobs:
5370
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5471
with:
5572
fetch-depth: 0
56-
ref: master
73+
ref: ${{ inputs.branch }}
5774
submodules: ${{ inputs.submodules }}
5875
- name: List all bundles
5976
id: list-bundles

.github/workflows/codeQLworkflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
description: 'The version of Maven set up'
2020
type: string
2121
required: false
22-
default: '3.9.10'
22+
default: '3.9.11'
2323

2424
env:
2525
MAVEN_ARGS: >-

.github/workflows/mavenBuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ on:
1919
description: 'The version of Maven set up'
2020
type: string
2121
required: false
22-
default: '3.9.10'
22+
default: '3.9.11'
2323

2424
permissions: {}
2525

.github/workflows/updateTarget.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Set up Maven
3333
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
3434
with:
35-
maven-version: 3.9.10
35+
maven-version: 3.9.11
3636
- name: Set up JDK
3737
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
3838
with:

JenkinsJobs/Releng/FOLDER.groovy

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,37 +95,31 @@ pipelineJob('Releng/prepareNextDevCycle'){
9595
}
9696
}
9797

98-
pipelineJob('Releng/renameAndPromote'){
99-
displayName('Rename and Promote')
98+
pipelineJob('Releng/promoteBuild'){
99+
displayName('Promote Build')
100100
description('''\
101101
This job does the "stage 1" or first part of a promotion.
102-
It renames the files for Equinox and Eclipse, creates an appropriate repo on 'downloads', rsync's everything to 'downloads', but leave everything "invisible" -- unless someone knows the exact URL.
102+
It renames the files for Equinox and Eclipse, creates an appropriate repo on 'downloads', sync's everything to 'downloads', but leave everything "invisible" -- unless someone knows the exact URL.
103103
This allows two things. First, allows artifacts some time to "mirror" when that is needed.
104104
But also, allows the sites and repositories to be examined for correctness before making them visible to the world.
105105
The second (deferred) step that makes things visible works, in part, based on some output of this first step. Hence, they must "share a workspace".
106106
''')
107107
parameters {
108108
stringParam('DROP_ID', null, '''\
109-
The name (or, build id) of the build to rename and promote. Typically would be a value such as I20160530-2000 or M20160912-1000.
109+
The name (or, build id) of the build to promote. Typically would be a value such as 'I20250714-1800'.
110110
It must match the name of the build on the build machine.
111111
''')
112112
stringParam('CHECKPOINT', null, 'M1, M3, RC1, RC2, RC3 etc (blank for final releases).')
113113
stringParam('SIGNOFF_BUG', null, 'The issue that was used to "signoff" the checkpoint. If there are no unit test failures, this can be left blank. Otherwise a link is added to test page explaining that "failing unit tests have been investigated".')
114114
stringParam('TRAIN_NAME', null, 'The name of the release stream, typically yyyy-mm. For example: 2022-09')
115-
stringParam('STREAM', null, 'Needs to be all three files of primary version for the release, such as 4.7.1 or 4.8.0.')
116-
stringParam('DL_TYPE', null, "This is the build type we are promoting TO. I-builds promote to 'S' until 'R'.")
117-
stringParam('TAG', null, ''' For passing to the tagEclipseRelease job.
118-
R is used for release builds. For example: R4_25
119-
S is used for milestones and includes the milestone version. For example: S4_25_0_RC2
120-
''')
121115
}
122116
definition {
123117
cpsScm {
124118
lightweight(true)
125119
scm {
126120
github('eclipse-platform/eclipse.platform.releng.aggregator', 'master')
127121
}
128-
scriptPath('JenkinsJobs/Releng/renameAndPromote.jenkinsfile')
122+
scriptPath('JenkinsJobs/Releng/promoteBuild.jenkinsfile')
129123
}
130124
}
131125
}
@@ -155,11 +149,11 @@ GitHub issue to track tagging the release, for example:
155149
}
156150
}
157151

158-
pipelineJob('Releng/makeVisible'){
159-
displayName('Make Visible')
152+
pipelineJob('Releng/publishPromotedBuild'){
153+
displayName('Publish Promoted Build')
160154
description('''\
161-
Make a 'release build', which was previously declared by running the 'Rename And Promote' job, visible.
162-
The first part of a promotion -- the 'Rename And Promote' job -- puts the build at its final location, but keeps it hidden.
155+
Make a 'release build', which was previously declared by running the 'Promote Build' job, visible.
156+
The first part of a promotion -- the 'Promote Build' job -- puts the build at its final location, but keeps it hidden.
163157
Therefore, both jobs have to share a 'workspace', and the output of the first job must remain in place until its time to "make visible".
164158
''')
165159
parameters {
@@ -175,7 +169,7 @@ It must match the name of the build on the download server.
175169
scm {
176170
github('eclipse-platform/eclipse.platform.releng.aggregator', 'master')
177171
}
178-
scriptPath('JenkinsJobs/Releng/makeVisible.jenkinsfile')
172+
scriptPath('JenkinsJobs/Releng/publishPromotedBuild.jenkinsfile')
179173
}
180174
}
181175
}
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
pipeline {
2+
options {
3+
skipDefaultCheckout()
4+
timestamps()
5+
timeout(time: 120, unit: 'MINUTES')
6+
buildDiscarder(logRotator(numToKeepStr:'5'))
7+
}
8+
agent {
9+
label 'basic'
10+
}
11+
environment {
12+
HIDE_SITE = 'true'
13+
// Download Server locations (would very seldom change)
14+
BUILD_ROOT = '/home/data/httpd/download.eclipse.org'
15+
EP_ECLIPSE_ROOT = "${BUILD_ROOT}/eclipse"
16+
EP_EQUINOX_ROOT = "${BUILD_ROOT}/equinox"
17+
}
18+
stages {
19+
stage('Process input') {
20+
steps {
21+
script {
22+
env.DROP_ID = readParameter('DROP_ID')
23+
if (!"${DROP_ID}") {
24+
error("Parameter 'DROP_ID' is not specified")
25+
}
26+
env.CHECKPOINT = readParameter('CHECKPOINT')
27+
env.SIGNOFF_BUG = readParameter('SIGNOFF_BUG')
28+
env.TRAIN_NAME = readParameter('TRAIN_NAME')
29+
if (!"${TRAIN_NAME}") {
30+
error("Parameter 'TRAIN_NAME' is not specified")
31+
}
32+
def idMatcher = null
33+
if ((idMatcher = env.DROP_ID =~ /(?<type>I)(?<date>\d{8})-(?<time>\d{4})/).matches()) {
34+
assignEnvVariable('BUILD_LABEL', "${DROP_ID}")
35+
} else if ((idMatcher = env.DROP_ID =~ /(?<type>S)-(?<major>\d+)\.(?<minor>\d+)(?<service>\.\d+)?((M|RC)\d+[a-z]?)?-(?<date>\d{8})(?<time>\d{4})/).matches()) {
36+
assignEnvVariable('BUILD_LABEL', idMatcher.group('major') + '.' + idMatcher.group('minor') + (idMatcher.group('service') ?: ''))
37+
if ("${CHECKPOINT}") {
38+
error "Stable build DROP_ID=${DROP_ID} may only be promoted to release CHECKPOINT, which therefore must be empty: ${CHECKPOINT}"
39+
}
40+
} else {
41+
error "DROP_ID, ${DROP_ID}, did not match any expected pattern."
42+
}
43+
assignEnvVariable('BUILD_TYPE', idMatcher.group('type'))
44+
assignEnvVariable('REPO_BUILD_TYPE', 'I')
45+
assignEnvVariable('BUILD_TIMESTAMP', idMatcher.group('date') + idMatcher.group('time'))
46+
assignEnvVariable('REPO_ID', "I${idMatcher.group('date')}-${idMatcher.group('time')}")
47+
idMatcher = null // release matcher as it's not serializable
48+
49+
assignEnvVariable('BUILD_LABEL_EQ', "${BUILD_LABEL}")
50+
assignEnvVariable('DROP_ID_EQ', "${DROP_ID}")
51+
52+
sh 'curl -o buildproperties.shsource --fail https://download.eclipse.org/eclipse/downloads/drops4/${DROP_ID}/buildproperties.shsource'
53+
def STREAM = sh(returnStdout: true, script: 'source ./buildproperties.shsource && echo ${STREAM}').trim()
54+
def versionMatcher = STREAM =~ /(?<major>\d+)\.(?<minor>\d+).(?<service>\d+)/
55+
if (!versionMatcher.matches()) {
56+
error "STREAM must contain major, minor, and service versions, such as '4.37.0', but found: ${STREAM}"
57+
}
58+
assignEnvVariable('BUILD_MAJOR', versionMatcher.group('major'))
59+
assignEnvVariable('BUILD_MINOR', versionMatcher.group('minor'))
60+
assignEnvVariable('BUILD_SERVICE', versionMatcher.group('service'))
61+
versionMatcher = null // release matcher as it's not serializable
62+
63+
if ("${CHECKPOINT}" ==~ /M\d+([a-z])?/ || "${CHECKPOINT}" ==~ /RC\d+([a-z])?/) { // milestone or RC promotion
64+
assignEnvVariable('DL_TYPE', 'S')
65+
// REPO_SITE_SEGMENT variale not used in this case
66+
} else if(!"${CHECKPOINT}") { // release promotion
67+
assignEnvVariable('DL_TYPE', 'R')
68+
assignEnvVariable('REPO_SITE_SEGMENT', "${BUILD_MAJOR}.${BUILD_MINOR}")
69+
} else {
70+
error "CHECKPOINT, ${CHECKPOINT}, did not match any expected pattern."
71+
}
72+
assignEnvVariable('NEWS_ID', "${BUILD_MAJOR}.${BUILD_MINOR}")
73+
74+
assignEnvVariable('DL_LABEL', "${BUILD_SERVICE}" == '0' // For initial releases, do not include service in label
75+
? "${BUILD_MAJOR}.${BUILD_MINOR}${CHECKPOINT}"
76+
: "${BUILD_MAJOR}.${BUILD_MINOR}.${BUILD_SERVICE}${CHECKPOINT}"
77+
)
78+
assignEnvVariable('DL_LABEL_EQ', "${DL_LABEL}")
79+
80+
// This is DL_DROP_ID for Eclipse. The one for equinox has DL_LABEL_EQ in middle.
81+
assignEnvVariable('DL_DROP_ID', "${DL_TYPE}-${DL_LABEL}-${BUILD_TIMESTAMP}")
82+
assignEnvVariable('DL_DROP_ID_EQ', "${DL_TYPE}-${DL_LABEL_EQ}-${BUILD_TIMESTAMP}")
83+
84+
if (!env.SIGNOFF_BUG) {
85+
echo '''\
86+
[WARNING] SIGNOFF_BUG was not defined. That is valid if no Unit Tests failures but otherwise should be defined.
87+
Can be added by hand to buildproperties.php in drop site, if in fact there were errors, and simply forgot to specify.
88+
'''.stripIndent()
89+
}
90+
91+
def serviceVersionSegment = (env.CHECKPOINT || env.BUILD_SERVICE != '0') ? ('_' + env.BUILD_SERVICE) : ''
92+
assignEnvVariable('TAG', "${DL_TYPE}${BUILD_MAJOR}_${BUILD_MINOR}${serviceVersionSegment}${env.CHECKPOINT ? ('_' + env.CHECKPOINT) : ''}")
93+
}
94+
}
95+
}
96+
stage('Rename and Promote') {
97+
environment {
98+
BUILDMACHINE_BASE_DL = "${EP_ECLIPSE_ROOT}/downloads/drops4"
99+
BUILDMACHINE_BASE_EQ = "${EP_EQUINOX_ROOT}/drops"
100+
BUILD_REPO_ORIGINAL = "${BUILD_MAJOR}.${BUILD_MINOR}-${REPO_BUILD_TYPE}-builds"
101+
BUILDMACHINE_BASE_SITE = "${EP_ECLIPSE_ROOT}/updates/${BUILD_REPO_ORIGINAL}"
102+
// Eclipse and Equinox drop Site (final segment)
103+
ECLIPSE_DL_DROP_DIR_SEGMENT = "${DL_TYPE}-${DL_LABEL}-${BUILD_TIMESTAMP}"
104+
EQUINOX_DL_DROP_DIR_SEGMENT = "${DL_TYPE}-${DL_LABEL_EQ}-${BUILD_TIMESTAMP}"
105+
}
106+
steps {
107+
writeFile(file: "${WORKSPACE}/stage2output${TRAIN_NAME}${CHECKPOINT}/mailtemplate.txt", text: """\
108+
We are pleased to announce that ${TRAIN_NAME} ${CHECKPOINT} is available for download and updates.
109+
110+
Eclipse downloads:
111+
https://download.eclipse.org/eclipse/downloads/drops4/${ECLIPSE_DL_DROP_DIR_SEGMENT}/
112+
113+
New and Noteworthy:
114+
https://www.eclipse.org/eclipse/news/${NEWS_ID}/
115+
116+
Update existing (non-production) installs:
117+
https://download.eclipse.org/eclipse/updates/${DL_TYPE == 'R' ? REPO_SITE_SEGMENT : BUILD_REPO_ORIGINAL}/
118+
119+
Specific repository good for building against:
120+
https://download.eclipse.org/eclipse/updates/${DL_TYPE == 'R' ? (REPO_SITE_SEGMENT + '/' + ECLIPSE_DL_DROP_DIR_SEGMENT) : (BUILD_REPO_ORIGINAL + '/' + DROP_ID)}/
121+
122+
Equinox specific downloads:
123+
https://download.eclipse.org/equinox/drops/${EQUINOX_DL_DROP_DIR_SEGMENT}/
124+
125+
Thank you to everyone who made this checkpoint possible.
126+
""".stripIndent())
127+
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
128+
sh '''#!/bin/bash -x
129+
curl -o promoteSites.sh https://download.eclipse.org/eclipse/relengScripts/cje-production/promotion/promoteSites.sh
130+
chmod +x promoteSites.sh
131+
./promoteSites.sh
132+
'''
133+
}
134+
build job: 'Releng/tagEclipseRelease', wait: true, propagate: true, parameters: [
135+
string(name: 'tag', value: "${TAG}"),
136+
string(name: 'buildID', value: "${DROP_ID}"),
137+
string(name: 'annotation', value: "${ params.SIGNOFF_BUG ? 'https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/issues/' + params.SIGNOFF_BUG : '' }")
138+
]
139+
}
140+
}
141+
}
142+
post {
143+
always {
144+
archiveArtifacts '**/stage2output*/**'
145+
}
146+
}
147+
}
148+
149+
@NonCPS
150+
def assignEnvVariable(String name, String value) {
151+
env."${name}" = value
152+
println("${name}=${value}")
153+
}
154+
155+
@NonCPS
156+
def readParameter(String name) {
157+
//TODO: let jenkins trim the parameters
158+
def value = (params[name] ?: '').trim()
159+
if (value) {
160+
println("${name}: ${value}")
161+
}
162+
return value
163+
}

JenkinsJobs/Releng/makeVisible.jenkinsfile renamed to JenkinsJobs/Releng/publishPromotedBuild.jenkinsfile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ pipeline {
1515
if (!params.releaseBuildID) {
1616
error "Required parameter 'releaseBuildID' is not defined."
1717
}
18-
env.RELEASE_ID = params.releaseBuildID.trim()
19-
def releaseIDMatcher = RELEASE_ID =~ /(?<type>[SR])-(?<major>\d+)\.(?<minor>\d+)(.\d+)?((M|RC)\d+[a-z]?)?-\d{12}/
18+
env.RELEASE_BUILD_ID = params.releaseBuildID.trim()
19+
def releaseIDMatcher = env.RELEASE_BUILD_ID =~ /(?<type>[SR])-(?<major>\d+)\.(?<minor>\d+)(\.\d+)?((M|RC)\d+[a-z]?)?-\d{12}/
2020
if (!releaseIDMatcher.matches()) {
21-
error "releaseID: ${RELEASE_ID}, does not match the expected pattern."
21+
error "releaseID: ${RELEASE_BUILD_ID}, does not match the expected pattern."
2222
}
2323
env.RELEASE_TYPE = releaseIDMatcher.group('type')
2424
env.RELEASE_VERSION_MAJOR = releaseIDMatcher.group('major')
@@ -27,31 +27,31 @@ pipeline {
2727
}
2828
sh '''
2929
echo 'Input parameters read successfully'
30-
echo "RELEASE_ID='$RELEASE_ID'"
30+
echo "RELEASE_BUILD_ID='$RELEASE_BUILD_ID'"
3131
echo "RELEASE_TYPE='$RELEASE_TYPE'"
3232
echo "RELEASE_VERSION_MAJOR='$RELEASE_VERSION_MAJOR'"
3333
echo "RELEASE_VERSION_MINOR='$RELEASE_VERSION_MINOR'"
3434
'''
3535
}
3636
}
37-
stage('Make Download page visible') {
37+
stage('Make Download Page visible') {
3838
steps {
3939
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
4040
sh '''#!/bin/bash -xe
4141
# Build machine locations (would very seldom change)
4242
DOWNLOAD_ROOT=${DOWNLOAD_ROOT:-/home/data/httpd/download.eclipse.org}
4343
ARCHIVE_ROOT=${ARCHIVE_ROOT:-/home/data/httpd/archive.eclipse.org}
44-
ECLIPSE_MARKER="eclipse/downloads/drops4/${RELEASE_ID}/buildHidden"
45-
EQUINOX_MARKER="equinox/drops/${RELEASE_ID}/buildHidden"
46-
SSH_PREFIX="ssh genie.releng@projects-storage.eclipse.org"
47-
48-
${SSH_PREFIX} rm --force "${DOWNLOAD_ROOT}/${ECLIPSE_MARKER}"
49-
${SSH_PREFIX} rm --force "${DOWNLOAD_ROOT}/${EQUINOX_MARKER}"
50-
44+
ROOT_LOCATIONS=("${DOWNLOAD_ROOT}")
5145
if [[ "${RELEASE_TYPE}" == 'R' ]]; then
52-
${SSH_PREFIX} rm --force "${ARCHIVE_ROOT}/${ECLIPSE_MARKER}"
53-
${SSH_PREFIX} rm --force "${ARCHIVE_ROOT}/${EQUINOX_MARKER}"
46+
ROOT_LOCATIONS+=("${ARCHIVE_ROOT}")
5447
fi
48+
MARKER_FILES=("eclipse/downloads/drops4/${RELEASE_BUILD_ID}/buildHidden" "equinox/drops/${RELEASE_BUILD_ID}/buildHidden")
49+
50+
for rootLocation in "${ROOT_LOCATIONS[@]}"; do
51+
for markerFile in "${MARKER_FILES[@]}"; do
52+
ssh genie.releng@projects-storage.eclipse.org rm --force "${rootLocation}/${markerFile}"
53+
done
54+
done
5555
'''
5656
}
5757
build job: 'Releng/updateIndex', wait: false
@@ -64,7 +64,7 @@ pipeline {
6464
steps {
6565
build job: 'Releng/modifyP2CompositeRepository', wait: true, propagate: true, parameters: [
6666
string(name: 'repositoryPath', value: "eclipse/updates/${RELEASE_VERSION_MAJOR}.${RELEASE_VERSION_MINOR}"),
67-
string(name: 'add', value: "${RELEASE_ID}")
67+
string(name: 'add', value: "${RELEASE_BUILD_ID}")
6868
]
6969
}
7070
}

0 commit comments

Comments
 (0)