@@ -228,118 +228,180 @@ pipeline {
228228 }
229229 }
230230 }
231- stage('Gather Eclipse Parts'){
232- environment {
233- KEYRING = credentials('secret-subkeys-releng.asc')
234- KEYRING_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase')
235- }
236- steps {
237- dir("${CJE_ROOT}/mbscripts") {
238- sh '''
239- set -eo pipefail
240- bash -x ./mb300_gatherEclipseParts.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb300_gatherEclipseParts.sh.log
241- '''
242- }
243- }
244- }
245- stage('Gather Equinox Parts'){
246- environment {
247- KEYRING = credentials('secret-subkeys-releng.asc')
248- KEYRING_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase')
249- }
250- steps {
251- dir("${CJE_ROOT}/mbscripts") {
252- sh '''
253- set -eo pipefail
254- ./mb310_gatherEquinoxParts.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb310_gatherEquinoxParts.sh.log
255- '''
256- }
257- }
258- }
259- stage('Generate Repo reports'){
260- steps {
261- dir("${CJE_ROOT}/mbscripts") {
262- sh '''
263- set -eo pipefail
264- ./mb500_createRepoReports.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb500_createRepoReports.sh.log
265- '''
266- }
267- }
268- }
269- stage('Generate API tools reports'){
270- steps {
271- dir("${CJE_ROOT}/mbscripts") {
272- sh '''
273- set -eo pipefail
274- ./mb510_createApiToolsReports.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb510_createApiToolsReports.sh.log
275- '''
276- }
277- }
278- }
279- stage('Export environment variables stage 2'){
231+ stage('Check for comparator errors') {
280232 steps {
233+ sh '''#!/bin/bash -xe
234+ source $CJE_ROOT/scripts/common-functions.shsource
235+ source $CJE_ROOT/buildproperties.shsource
236+
237+ # Gather maven properties
238+ cp $CJE_ROOT/$AGG_DIR/eclipse-platform-parent/target/mavenproperties.properties $CJE_ROOT/$DROP_DIR/$BUILD_ID/mavenproperties.properties
239+
240+ # Gather artifactcomparisons
241+ pushd $CJE_ROOT/$AGG_DIR
242+ comparatorlogsDir=${CJE_ROOT}/${DROP_DIR}/${BUILD_ID}/buildlogs/comparatorlogs
243+ mkdir -p $comparatorlogsDir
244+ find . -regex .*target/artifactcomparison -type d -exec zip -r $comparatorlogsDir/artifactcomparisons.zip '{}' \\;
245+ popd
246+
247+ # Verify comparatorlogs
248+ #
249+ # Note: copy mb220_buildSdkPatch.sh.log as mb060_run-maven-build_output.txt for now to avoid changing eclipse_compare.xml
250+ # ToDo: Modify org.eclipse.releng.build.tools.comparator.Extractor to be configurable:
251+ # https://github.com/eclipse-platform/eclipse.platform.releng.buildtools/blob/c5f7ecf1951d44311e24ce7bd6b505189aabb4da/bundles/org.eclipse.releng.build.tools.comparator/src/org/eclipse/releng/build/tools/comparator/Extractor.java#L27
252+ cp ${logDir}/mb220_buildSdkPatch.sh.log $CJE_ROOT/$DROP_DIR/$BUILD_ID/buildlogs/mb060_run-maven-build_output.txt
253+
254+ pushd $CJE_ROOT/$DROP_DIR/$BUILD_ID
255+ java -jar $LAUNCHER_JAR \
256+ -application org.eclipse.ant.core.antRunner \
257+ -buildfile $ECLIPSE_BUILDER_DIR/eclipse/buildScripts/eclipse_compare.xml \
258+ -data $CJE_ROOT/$TMP_DIR/workspace-comparatorLogs \
259+ -DbuildDirectory=$CJE_ROOT/$DROP_DIR/$BUILD_ID \
260+ -Djava.io.tmpdir=$CJE_ROOT/$TMP_DIR \
261+ -v \
262+ compare
263+ popd
264+
265+ comparatorLogMinimumSize=350
266+ comparatorLog=${comparatorlogsDir}/buildtimeComparatorUnanticipated.log.txt
267+ logSize=$(stat --format='%s' ${comparatorLog})
268+ if [[ ${logSize} -gt ${comparatorLogMinimumSize} ]]; then
269+ echo -e "DEBUG: found logsize greater an minimum. preparing message using ${link}"
270+ fn-write-property COMPARATOR_ERRORS "true"
271+ fn-write-property COMPARATOR_ERRORS_SUBJECT "\\"- Comparator Errors Found\\""
272+ else
273+ echo -e "DEBUG: comparator logSize of $logSize was not greater than comparatorLogMinimumSize of ${comparatorLogMinimumSize}"
274+ fn-write-property COMPARATOR_ERRORS_SUBJECT "\\"\\""
275+ fi
276+ '''
281277 script {
282278 def buildProps = readBuildProperties("${CJE_ROOT}/buildproperties.properties")
283279 env.COMPARATOR_ERRORS_SUBJECT = buildProps.COMPARATOR_ERRORS_SUBJECT
284280 }
285281 }
286282 }
287- stage('Archive artifacts'){
288- steps {
289- sh '''
290- source $CJE_ROOT/buildproperties.shsource
291- cp -r $logDir/* $CJE_ROOT/$DROP_DIR/$BUILD_ID/buildlogs
292- rm -rf $CJE_ROOT/$DROP_DIR/$BUILD_ID/apitoolingreference
293- cp $CJE_ROOT/buildproperties.* $CJE_ROOT/$DROP_DIR/$BUILD_ID
294- cp $CJE_ROOT/$DROP_DIR/$BUILD_ID/buildproperties.* $CJE_ROOT/$EQUINOX_DROP_DIR/$BUILD_ID
295- '''
296- }
297- }
298- stage('Promote Eclipse platform'){
299- steps {
300- dir("${CJE_ROOT}/mbscripts") {
301- sshagent(['projects-storage.eclipse.org-bot-ssh']) {
302- sh '''
303- ./mb600_promoteEclipse.sh $CJE_ROOT/buildproperties.shsource
304- '''
305- }
306- build job: 'Releng/updateIndex', wait: false
283+ stage('Promote results') {
284+ parallel {
285+ stage('Eclipse') {
286+ stages {
287+ stage('Gather Eclipse parts') {
288+ environment {
289+ KEYRING = credentials('secret-subkeys-releng.asc')
290+ KEYRING_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase')
291+ }
292+ steps {
293+ dir("${CJE_ROOT}/mbscripts") {
294+ sh '''#!/bin/bash -xe
295+ set -o pipefail
296+ source $CJE_ROOT/buildproperties.shsource
297+ cp $CJE_ROOT/buildproperties.* $CJE_ROOT/$DROP_DIR/$BUILD_ID
298+ ./mb300_gatherEclipseParts.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb300_gatherEclipseParts.sh.log
299+ '''
300+ }
301+ }
302+ }
303+ stage('Generate Repo reports') {
304+ steps {
305+ dir("${CJE_ROOT}/mbscripts") {
306+ sh '''#!/bin/bash -xe
307+ set -eo pipefail
308+ ./mb500_createRepoReports.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb500_createRepoReports.sh.log
309+ '''
310+ }
311+ }
312+ }
313+ stage('Generate API tools reports') {
314+ steps {
315+ dir("${CJE_ROOT}/mbscripts") {
316+ sh '''#!/bin/bash -xe
317+ set -eo pipefail
318+ source $CJE_ROOT/buildproperties.shsource
319+ ./mb510_createApiToolsReports.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb510_createApiToolsReports.sh.log
320+ rm -rf $CJE_ROOT/$DROP_DIR/$BUILD_ID/apitoolingreference
321+ '''
322+ }
323+ }
324+ }
325+ stage('Promote Eclipse platform') {
326+ steps {
327+ dir("${CJE_ROOT}/mbscripts") {
328+ sshagent(['projects-storage.eclipse.org-bot-ssh']) {
329+ sh '''#!/bin/bash -xe
330+ ./mb600_promoteEclipse.sh $CJE_ROOT/buildproperties.shsource
331+ '''
332+ }
333+ build job: 'Releng/updateIndex', wait: false
334+ }
335+ }
336+ }
337+ }
307338 }
308- }
309- }
310- stage('Promote Equinox'){
311- steps {
312- dir("${CJE_ROOT}/mbscripts") {
313- sshagent(['projects-storage.eclipse.org-bot-ssh']) {
314- sh '''
315- ./mb610_promoteEquinox.sh $CJE_ROOT/buildproperties.shsource
316- '''
317- }
339+ stage('Equinox') {
340+ stages {
341+ stage('Gather Equinox parts') {
342+ environment {
343+ KEYRING = credentials('secret-subkeys-releng.asc')
344+ KEYRING_PASSPHRASE = credentials('secret-subkeys-releng.asc-passphrase')
345+ }
346+ steps {
347+ dir("${CJE_ROOT}/mbscripts") {
348+ sh '''#!/bin/bash -xe
349+ set -o pipefail
350+ source $CJE_ROOT/buildproperties.shsource
351+ cp $CJE_ROOT/buildproperties.* $CJE_ROOT/$EQUINOX_DROP_DIR/$BUILD_ID
352+ ./mb310_gatherEquinoxParts.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb310_gatherEquinoxParts.sh.log
353+ '''
354+ }
355+ }
356+ }
357+ stage('Promote Equinox') {
358+ steps {
359+ dir("${CJE_ROOT}/mbscripts") {
360+ sshagent(['projects-storage.eclipse.org-bot-ssh']) {
361+ sh '''#!/bin/bash -xe
362+ ./mb610_promoteEquinox.sh $CJE_ROOT/buildproperties.shsource
363+ '''
364+ }
365+ }
366+ }
367+ }
368+ }
318369 }
319- }
320- }
321- stage('Promote Update Site'){
322- steps {
323- dir("${CJE_ROOT}/mbscripts") {
324- sshagent(['projects-storage.eclipse.org-bot-ssh']) {
325- sh '''
326- ./mb620_promoteUpdateSite.sh $CJE_ROOT/buildproperties.shsource
327- '''
328- }
329- script {
330- if ("${COMPARATOR_ERRORS_SUBJECT}" != '' && "$BUILD_TYPE" == "I") {
331- echo 'Skip adding unstable build to composite repository.'
332- return
370+ stage('Update Site') {
371+ steps {
372+ dir("${CJE_ROOT}/mbscripts") {
373+ sshagent(['projects-storage.eclipse.org-bot-ssh']) {
374+ sh '''#!/bin/bash -xe
375+ ./mb620_promoteUpdateSite.sh $CJE_ROOT/buildproperties.shsource
376+ '''
377+ }
378+ }
379+ script {
380+ if ("${COMPARATOR_ERRORS_SUBJECT}" != '' && "${BUILD_TYPE}" == 'I') {
381+ echo 'Skip adding unstable build to composite repository.'
382+ return
383+ }
384+ build job: 'Releng/modifyP2CompositeRepository', wait: true, propagate: true, parameters: [
385+ string(name: 'repositoryPath', value: "eclipse/updates/${RELEASE_VER}-${BUILD_TYPE}-builds"),
386+ string(name: 'add', value: "${BUILD_IID}"),
387+ string(name: 'sizeLimit', value: '3')
388+ ]
333389 }
334- build job: 'Releng/modifyP2CompositeRepository', wait: true, propagate: true, parameters: [
335- string(name: 'repositoryPath', value: "eclipse/updates/${RELEASE_VER}-${BUILD_TYPE}-builds"),
336- string(name: 'add', value: "${BUILD_IID}"),
337- string(name: 'sizeLimit', value: '3')
338- ]
339390 }
340391 }
341392 }
342393 }
394+ stage('Archive build logs') {
395+ steps {
396+ sshagent(['projects-storage.eclipse.org-bot-ssh']) {
397+ sh '''#!/bin/bash -xe
398+ source $CJE_ROOT/buildproperties.shsource
399+ dropPath=/home/data/httpd/download.eclipse.org/eclipse/downloads/drops4/${BUILD_ID}
400+ scp -r $logDir/*
[email protected] :${dropPath}/buildlogs/
401+ '''
402+ }
403+ }
404+ }
343405 stage('Trigger tests') {
344406 steps {
345407 script {
@@ -412,7 +474,7 @@ def assignEnvVariable(String name, String value) {
412474 println("${name}=${value}")
413475}
414476
415- def readBuildProperties(String buildPropertiesFile){
477+ def readBuildProperties(String buildPropertiesFile) {
416478 return readProperties(file: buildPropertiesFile, charset: 'UTF-8').collectEntries{n, v ->
417479 v = v.trim();
418480 return [n, (v.startsWith('"') && v.endsWith('"') ? v.substring(1, v.length() - 1) : v)]
0 commit comments