From e6e947b08376ccbb6657ca038c1325c23313065f Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Tue, 9 Sep 2025 23:14:57 +0200 Subject: [PATCH] [RelEng] Make read of releaseName more robust in publication pipeline Don't launch Maven to output the interpolated 'releaseName' property, but instead read the 'releaseYear' and 'releaseMonth' properties from the raw (eclipse-platform-parent/pom.xml) file. This avoids problems if at the time of the release (candidate) build a snapshot version was used, e.g. of Tycho, that's not available anymore at the time of the publication (because e.g. that Tycho version was released in the meantime). --- JenkinsJobs/Releng/publishPromotedBuild.jenkinsfile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/JenkinsJobs/Releng/publishPromotedBuild.jenkinsfile b/JenkinsJobs/Releng/publishPromotedBuild.jenkinsfile index 5c0da85a0c8..4b726938f48 100644 --- a/JenkinsJobs/Releng/publishPromotedBuild.jenkinsfile +++ b/JenkinsJobs/Releng/publishPromotedBuild.jenkinsfile @@ -44,11 +44,14 @@ pipeline { cd eclipse.platform.releng.aggregator git sparse-checkout set --no-cone eclipse-platform-parent/pom.xml git checkout - - mvn -f eclipse-platform-parent help:evaluate -Dexpression=releaseName '-Doutput=${WORKSPACE}/releaseName-value.txt' \ - --batch-mode --no-transfer-progress --no-snapshot-updates """ - assignEnvVariable('TRAIN_NAME', readFile('releaseName-value.txt').trim()) + def eclipseParentPOM = readFile('eclipse.platform.releng.aggregator/eclipse-platform-parent/pom.xml') + def yearMatcher = eclipseParentPOM =~ /(?\d+)<\/releaseYear>/ + def monthMatcher = eclipseParentPOM =~ /(?\d+)<\/releaseMonth>/ + if (!yearMatcher.find() || !monthMatcher.find()) { + error "Eclipse Parent POM does not contain releaseYear or releaseMonth" + } + assignEnvVariable('TRAIN_NAME', yearMatcher.group('year') + '-' + monthMatcher.group('month')) if (!env.TRAIN_NAME) { error "TRAIN_NAME is empty." }