@@ -34,6 +34,7 @@ pipeline {
3434 environment {
3535 MAVEN_OPTS = '-Xmx4G'
3636 CJE_ROOT = "${WORKSPACE}/cje-production"
37+ SCRIPTS = "${WORKSPACE}/scripts"
3738 AGG_DIR = "${CJE_ROOT}/gitCache/eclipse.platform.releng.aggregator"
3839 logDir = "$CJE_ROOT/buildlogs"
3940
@@ -168,31 +169,38 @@ pipeline {
168169 }
169170 // Git log creation
170171 sh '''#!/bin/bash -xe
171- reportTimestamp=$(TZ="America/New_York" date +%Y%m%d-%H%M)
172+ reportTimestamp=$(TZ='UTC' date +%Y%m%d-%H%M)
172173 export lastTag=$(cat "${WORKSPACE}/lastTag")
173174 if [[ -n "$lastTag" ]]; then
174- export gitLogFile="${DROP_DIR}/$BUILD_ID/gitLog.html "
175+ export gitLogFile="${DROP_DIR}/$BUILD_ID/gitLog.json "
175176 mkdir -p $(dirname "${gitLogFile}")
176177
177- echo -e "<h2>Git log from $lastTag (previous) to $BUILD_ID (current)</h2>" > $gitLogFile
178- echo -e "<h2>The tagging, and this report, were done at about $reportTimestamp</h2>" >> $gitLogFile
178+ echo '{' > $gitLogFile
179+ echo "\\"label\\": \\"${BUILD_ID}\\"," >> $gitLogFile
180+ echo "\\"logFrom\\": \\"${lastTag}\\"," >> $gitLogFile
181+ echo "\\"logTo\\": \\"${BUILD_ID}\\"," >> $gitLogFile
182+ echo "\\"timestamp\\": \\"${reportTimestamp}\\"," >> $gitLogFile
183+ echo "\\"repositories\\": [" >> $gitLogFile >> $gitLogFile
179184
180185 function createGitLog() {
181186 gitURL=$(git config remote.origin.url | sed --expression 's,
[email protected] :,https://github.com/,' | sed 's/\\.git$//')
182187 gitName="${gitURL##*/}"
183- gitLog=$(git log $lastTag..$BUILD_ID --date=short --format=format:"<tr><td class=\"datecell\">%cd</td><td class=\"commitcell\"><a href=\"${gitURL}/commit/%H\">%s</a></td><td class=\"authorcell\">%aN</td></tr>")
188+ #TODO: handle potential double-quotes in commit message?
189+ gitLog=$(git log $lastTag..$BUILD_ID --date=short --format=format:"{ \\"date\\": \\"%cd\\", \\"message\\": \\"%s\\", \\"author\\": \\"%aN\\", \\"url\\": \\"${gitURL}/commit/%H\\"},")
184190 if [ -n "$gitLog" ]; then
185191 echo "Record changes in ${gitName}"
186- echo "<table><tbody> <tr><th class=\"cell\" colspan=\"3\">Repository: ${gitName}</th></tr> " >> $gitLogFile
187- echo "<tr> <th class=\"datecell\">Date</th> <th class=\"commitcell\">Commit message</th> <th class=\"authorcell\">Author</th> </tr> " >> $gitLogFile
188- echo "${gitLog} " >> $gitLogFile
189- echo "</tbody></table><br><br> " >> $gitLogFile
190- echo '' >> $gitLogFile
192+ echo "{ " >> $gitLogFile
193+ echo "\\"name\\": \\"${gitName}\\", " >> $gitLogFile
194+ echo "\\"commits\\": [ " >> $gitLogFile
195+ echo "${gitLog%,} " >> $gitLogFile
196+ echo "]}," >> $gitLogFile
191197 fi
192198 }
193199 export -f createGitLog
194200 createGitLog
195201 git submodule foreach 'createGitLog'
202+
203+ echo "{}]}" >> $gitLogFile # Append empty object to keep JSON valid
196204 else
197205 echo -e "\n\tGit log not generated because a reasonable previous tag could not be found." > $gitLogFile
198206 fi
@@ -291,14 +299,18 @@ pipeline {
291299 stage('Gather Eclipse parts') {
292300 tools {
293301 jdk 'temurin-jdk25-latest'
294- }
302+ }
295303 environment {
296304 KEYRING = credentials('secret-subkeys-releng.asc')
297305 KEYRING_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase')
298306 }
299307 steps {
308+ dir("${DROP_DIR}/${BUILD_ID}") {
309+ script {
310+ utilities.copyStaticWebsiteFiles("${AGG_DIR}", 'eclipse/build')
311+ }
312+ }
300313 sh '''#!/bin/bash -xe
301- mkdir -p ${DROP_DIR}/${BUILD_ID}
302314 cp $CJE_ROOT/buildproperties.* ${DROP_DIR}/${BUILD_ID}
303315 source $CJE_ROOT/buildproperties.shsource
304316
@@ -441,20 +453,12 @@ pipeline {
441453 bash ${CJE_ROOT}/scripts/produceChecksum.sh eclipse
442454 popd
443455
444- cp -r ${ECLIPSE_BUILDER_DIR}/eclipse/publishingFiles/staticDropFiles/. ${DROP_DIR}/${BUILD_ID}
445-
446456 java \
447- -DisBuildTested=true \
448- -DbuildType=${BUILD_TYPE} \
449- -DdropTokenList='%repository%,%sdk%,%tests%,%runtime%,%jdtc%,%swt%' \
450- -DdropHtmlFileName=index.php \
451- -DxmlDirectoryName=${DROP_DIR}/${BUILD_ID}/testresults/xml \
452- -DdropDirectoryName=${DROP_DIR}/${BUILD_ID} \
453- -DdropTemplateFileName=${ECLIPSE_BUILDER_DIR}/eclipse/publishingFiles/templateFiles/index.template.php \
454- -DcompileLogsDirectoryName=${DROP_DIR}/${BUILD_ID}/compilelogs/plugins \
455- -DtestManifestFileName=${ECLIPSE_BUILDER_DIR}/eclipse/publishingFiles/testManifest.xml \
456- -DtestsConfigExpected=${TEST_CONFIGURATIONS_EXPECTED} \
457- ${WORKSPACE}/scripts/releng/TestResultsGenerator.java
457+ -DdropDirectory=${DROP_DIR}/${BUILD_ID} \
458+ ${SCRIPTS}/releng/BuildDropDataGenerator.java mainEclipse
459+ java \
460+ -DdropDirectory=${DROP_DIR}/${BUILD_ID} \
461+ ${SCRIPTS}/releng/CompilerSummaryGenerator.java
458462 '''
459463 }
460464 }
@@ -479,14 +483,18 @@ pipeline {
479483 stage('Gather Equinox parts') {
480484 tools {
481485 jdk 'temurin-jdk25-latest'
482- }
486+ }
483487 environment {
484488 KEYRING = credentials('secret-subkeys-releng.asc')
485489 KEYRING_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase')
486490 }
487491 steps {
492+ dir("${EQUINOX_DROP_DIR}/${BUILD_ID}") {
493+ script {
494+ utilities.copyStaticWebsiteFiles("${AGG_DIR}", 'equinox/build')
495+ }
496+ }
488497 sh '''#!/bin/bash -xe
489- mkdir -p ${EQUINOX_DROP_DIR}/${BUILD_ID}
490498 cp $CJE_ROOT/buildproperties.* ${EQUINOX_DROP_DIR}/${BUILD_ID}
491499 source $CJE_ROOT/buildproperties.shsource
492500
@@ -518,20 +526,18 @@ pipeline {
518526 cat $f
519527 done
520528
521- # Publish Equinox
529+ # Build Equinox Launcher archives
522530 pushd $CJE_ROOT
523531 mkdir -p $ECLIPSE_BUILDER_DIR/equinox/$TMP_DIR
524532 mkdir -p $CJE_ROOT/$TMP_DIR
525533 $BASE_BUILDER_ECLIPSE_EXE \
526534 -application org.eclipse.ant.core.antRunner \
527- -buildfile $ECLIPSE_BUILDER_DIR/equinox/helper .xml \
535+ -buildfile ${ ECLIPSE_BUILDER_DIR} /equinox/buildConfigs/equinox-launchers/build .xml \
528536 -data $CJE_ROOT/$TMP_DIR/workspace-publishEquinox \
529- -DEBuilderDir=$ECLIPSE_BUILDER_DIR \
530537 -DbuildDir=$BUILD_ID \
531538 -DbuildId=$BUILD_ID \
532539 -DbuildRepo=$PLATFORM_REPO_DIR \
533540 -DequinoxPostingDirectory=${EQUINOX_DROP_DIR} \
534- -DeqpublishingContent=$ECLIPSE_BUILDER_DIR/equinox/publishingFiles \
535541 -Dequinox.build.configs=$ECLIPSE_BUILDER_DIR/equinox/buildConfigs \
536542 -Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
537543 -v \
@@ -542,19 +548,9 @@ pipeline {
542548 bash ${CJE_ROOT}/scripts/produceChecksum.sh equinox
543549 popd
544550
545- cp -r ${ECLIPSE_BUILDER_DIR}/equinox/publishingFiles/staticDropFiles/. ${EQUINOX_DROP_DIR}/${BUILD_ID}
546-
547551 java \
548- -DisBuildTested=false \
549- -DbuildType=${BUILD_TYPE} \
550- -DdropTokenList='%equinox%,%framework%,%extrabundles%,%other%,%launchers%,%osgistarterkits%' \
551- -DdropHtmlFileName=index.php \
552- -DxmlDirectoryName=${DROP_DIR}/$BUILD_ID/testresults/xml \
553- -DdropDirectoryName=${EQUINOX_DROP_DIR}/${BUILD_ID} \
554- -DdropTemplateFileName=${ECLIPSE_BUILDER_DIR}/equinox/publishingFiles/templateFiles/index.template.php \
555- -DcompileLogsDirectoryName=${EQUINOX_DROP_DIR}/${BUILD_ID}/compilelogs/plugins \
556- -DtestManifestFileName=${ECLIPSE_BUILDER_DIR}/equinox/publishingFiles/testManifest.xml \
557- ${WORKSPACE}/scripts/releng/TestResultsGenerator.java
552+ -DdropDirectory=${EQUINOX_DROP_DIR}/${BUILD_ID} \
553+ ${SCRIPTS}/releng/BuildDropDataGenerator.java mainEquinox
558554 '''
559555 }
560556 }
@@ -599,6 +595,9 @@ pipeline {
599595 }
600596 }
601597 stage('Archive build logs') {
598+ tools {
599+ jdk 'temurin-jdk25-latest'
600+ }
602601 steps {
603602 script {
604603 // See https://github.com/jenkinsci/pipeline-stage-view-plugin/tree/master/rest-api#get-jobjob-namewfapiruns
@@ -607,7 +606,7 @@ pipeline {
607606 for (jobStage in description['stages']) {
608607 if (jobStage.status != 'IN_PROGRESS') {
609608 def prefix = 's' + String.format('%03d', stageIndex++) // prefix with index to establish stable order
610- def logFileName = "${logDir} /" + prefix + '_' + jobStage.name.replace(' ', '_').replace('Declarative:_', '') + '.log'
609+ def logFileName = "${DROP_DIR}/${BUILD_ID}/buildlogs /" + prefix + '_' + jobStage.name.replace(' ', '_').replace('Declarative:_', '') + '.log'
611610 sh """
612611 curl --fail --silent --output '${logFileName}' ${BUILD_URL}/pipeline-overview/log?nodeId=${jobStage.id}
613612 # Test (efficiently) if the file starts with the no-logs message and if yes, ensure it doesn't contain more other lines
@@ -620,8 +619,10 @@ pipeline {
620619 }
621620 sshagent(['projects-storage.eclipse.org-bot-ssh']) {
622621 sh '''#!/bin/bash -xe
623- dropPath=${EP_ECLIPSE_DROPS}/${BUILD_ID}
624- scp -r $logDir/*
[email protected] :${dropPath}/buildlogs/
622+ java \
623+ -DdropDirectory=${DROP_DIR}/${BUILD_ID} \
624+ ${SCRIPTS}/releng/BuildDropDataGenerator.java buildLogs
625+ rsync -avzh ${DROP_DIR}/${BUILD_ID}/buildlogs/
[email protected] :${EP_ECLIPSE_DROPS}/${BUILD_ID}/buildlogs/
625626 '''
626627 }
627628 }
0 commit comments