From 67c27f494f9476cb49b44805b6efbf245e2f1587 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Mon, 29 Apr 2024 20:09:13 +0200 Subject: [PATCH] [I-Build-Tests] Unify description, parameter and log-rotation specs and split some long lines. --- .../I_unit_cen64_gtk3_java17.groovy | 38 ++++++++++--------- .../I_unit_cen64_gtk3_java21.groovy | 38 ++++++++++--------- .../I_unit_cen64_gtk3_java22.groovy | 38 ++++++++++--------- .../AutomatedTests/I_unit_mac64_java17.groovy | 11 +++--- .../AutomatedTests/I_unit_macM1_java17.groovy | 8 ++-- .../AutomatedTests/I_unit_win32_java17.groovy | 4 +- 6 files changed, 76 insertions(+), 61 deletions(-) diff --git a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy index f5d7615846b..273862d1f08 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy @@ -6,25 +6,21 @@ for (STREAM in STREAMS){ def MINOR = STREAM.split('\\.')[1] pipelineJob('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-cen64-gtk3-java17'){ - - logRotator { - numToKeep(5) - } - - parameters { - stringParam('buildId', null, null) - } + description('Run Eclipse SDK Tests for the platform implied by this job\'s name') definition { cps { sandbox() script(''' pipeline { - options { - timeout(time: 600, unit: 'MINUTES') - timestamps() - buildDiscarder(logRotator(numToKeepStr:'5')) - } + options { + timeout(time: 600, unit: 'MINUTES') + timestamps() + buildDiscarder(logRotator(numToKeepStr:'5')) + } + parameters { + string(name: 'buildId', defaultValue: null, description: 'Build Id to test (such as I20120717-0800, N20120716-0800).') + } agent { kubernetes { label 'centos-unitpod17' @@ -86,10 +82,10 @@ spec: stages { stage('Run tests'){ environment { - // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of fundamental commands like xvnc, pkill and sh + // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of system commands like xvnc, pkill and sh JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk17-latest') ANT_HOME = tool(type:'ant', name:'apache-ant-latest') - PATH = "$JAVA_HOME/bin:$ANT_HOME/bin:$PATH" + PATH = "${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}" } steps { container ('custom'){ @@ -130,7 +126,11 @@ spec: ant -diagnostics 1>antDiagnostics.txt 2>&1 java -XshowSettings -version 1>javaSettings.txt 2>&1 - ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 -DtestSuite=all -Djvm=${JAVA_HOME}/bin/java + ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} \\ + -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} \\ + -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 \\ + -DtestSuite=all \\ + -Djvm=${JAVA_HOME}/bin/java RAW_DATE_END="$(date +%s )" @@ -144,7 +144,11 @@ spec: } archiveArtifacts '**/eclipse-testing/results/**, **/eclipse-testing/directorLogs/**, *.properties, *.txt' junit keepLongStdio: true, testResults: '**/eclipse-testing/results/xml/*.xml' - build job: 'Releng/ep-collectResults', parameters: [string(name: 'triggeringJob', value: "${JOB_BASE_NAME}"), string(name: 'buildURL', value: "${BUILD_URL}"), string(name: 'buildID', value: "${params.buildId}")], wait: false + build job: 'Releng/ep-collectResults', wait: false, parameters: [ + string(name: 'triggeringJob', value: "${JOB_BASE_NAME}"), + string(name: 'buildURL', value: "${BUILD_URL}"), + string(name: 'buildID', value: "${params.buildId}") + ] } } } diff --git a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy index 3710f2e0a81..477b1acb99d 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy @@ -6,25 +6,21 @@ for (STREAM in STREAMS){ def MINOR = STREAM.split('\\.')[1] pipelineJob('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-cen64-gtk3-java21'){ - - logRotator { - numToKeep(5) - } - - parameters { - stringParam('buildId', null, null) - } + description('Run Eclipse SDK Tests for the platform implied by this job\'s name') definition { cps { sandbox() script(''' pipeline { - options { - timeout(time: 600, unit: 'MINUTES') - timestamps() - buildDiscarder(logRotator(numToKeepStr:'5')) - } + options { + timeout(time: 600, unit: 'MINUTES') + timestamps() + buildDiscarder(logRotator(numToKeepStr:'5')) + } + parameters { + string(name: 'buildId', defaultValue: null, description: 'Build Id to test (such as I20120717-0800, N20120716-0800).') + } agent { kubernetes { label 'centos-unitpod21' @@ -86,10 +82,10 @@ spec: stages { stage('Run tests'){ environment { - // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of fundamental commands like xvnc, pkill and sh + // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of system commands like xvnc, pkill and sh JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk21-latest') ANT_HOME = tool(type:'ant', name:'apache-ant-latest') - PATH = "$JAVA_HOME/bin:$ANT_HOME/bin:$PATH" + PATH = "${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}" } steps { container ('custom'){ @@ -130,7 +126,11 @@ spec: ant -diagnostics 1>antDiagnostics.txt 2>&1 java -XshowSettings -version 1>javaSettings.txt 2>&1 - ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 -DtestSuite=all -Djvm=${JAVA_HOME}/bin/java + ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} \\ + -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} \\ + -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 \\ + -DtestSuite=all \\ + -Djvm=${JAVA_HOME}/bin/java RAW_DATE_END="$(date +%s )" @@ -144,7 +144,11 @@ spec: } archiveArtifacts '**/eclipse-testing/results/**, **/eclipse-testing/directorLogs/**, *.properties, *.txt' junit keepLongStdio: true, testResults: '**/eclipse-testing/results/xml/*.xml' - build job: 'Releng/ep-collectResults', parameters: [string(name: 'triggeringJob', value: "${JOB_BASE_NAME}"), string(name: 'buildURL', value: "${BUILD_URL}"), string(name: 'buildID', value: "${params.buildId}")], wait: false + build job: 'Releng/ep-collectResults', wait: false, parameters: [ + string(name: 'triggeringJob', value: "${JOB_BASE_NAME}"), + string(name: 'buildURL', value: "${BUILD_URL}"), + string(name: 'buildID', value: "${params.buildId}") + ] } } } diff --git a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy index 7a29cad234a..ec0b879346b 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy @@ -6,25 +6,21 @@ for (STREAM in STREAMS){ def MINOR = STREAM.split('\\.')[1] pipelineJob('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-cen64-gtk3-java22'){ - - logRotator { - numToKeep(5) - } - - parameters { - stringParam('buildId', null, null) - } + description('Run Eclipse SDK Tests for the platform implied by this job\'s name') definition { cps { sandbox() script(''' pipeline { - options { - timeout(time: 600, unit: 'MINUTES') - timestamps() - buildDiscarder(logRotator(numToKeepStr:'5')) - } + options { + timeout(time: 600, unit: 'MINUTES') + timestamps() + buildDiscarder(logRotator(numToKeepStr:'5')) + } + parameters { + string(name: 'buildId', defaultValue: null, description: 'Build Id to test (such as I20120717-0800, N20120716-0800).') + } agent { kubernetes { label 'centos-unitpod22' @@ -86,10 +82,10 @@ spec: stages { stage('Run tests'){ environment { - // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of fundamental commands like xvnc, pkill and sh + // Declaring a jdk and ant the usual way in the 'tools' section, because of unknown reasons, breaks the usage of system commands like xvnc, pkill and sh JAVA_HOME = tool(type:'jdk', name:'openjdk-jdk22-latest') ANT_HOME = tool(type:'ant', name:'apache-ant-latest') - PATH = "$JAVA_HOME/bin:$ANT_HOME/bin:$PATH" + PATH = "${JAVA_HOME}/bin:${ANT_HOME}/bin:${PATH}" } steps { container ('custom'){ @@ -130,7 +126,11 @@ spec: ant -diagnostics 1>antDiagnostics.txt 2>&1 java -XshowSettings -version 1>javaSettings.txt 2>&1 - ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 -DtestSuite=all -Djvm=${JAVA_HOME}/bin/java + ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} \\ + -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} \\ + -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=x86_64 \\ + -DtestSuite=all \\ + -Djvm=${JAVA_HOME}/bin/java RAW_DATE_END="$(date +%s )" @@ -144,7 +144,11 @@ spec: } archiveArtifacts '**/eclipse-testing/results/**, **/eclipse-testing/directorLogs/**, *.properties, *.txt' junit keepLongStdio: true, testResults: '**/eclipse-testing/results/xml/*.xml' - build job: 'Releng/ep-collectResults', parameters: [string(name: 'triggeringJob', value: "${JOB_BASE_NAME}"), string(name: 'buildURL', value: "${BUILD_URL}"), string(name: 'buildID', value: "${params.buildId}")], wait: false + build job: 'Releng/ep-collectResults', wait: false, parameters: [ + string(name: 'triggeringJob', value: "${JOB_BASE_NAME}"), + string(name: 'buildURL', value: "${BUILD_URL}"), + string(name: 'buildID', value: "${params.buildId}") + ] } } } diff --git a/JenkinsJobs/AutomatedTests/I_unit_mac64_java17.groovy b/JenkinsJobs/AutomatedTests/I_unit_mac64_java17.groovy index ed10080f869..bee7e773bd3 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_mac64_java17.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_mac64_java17.groovy @@ -6,11 +6,10 @@ for (STREAM in STREAMS){ def MINOR = STREAM.split('\\.')[1] job('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-mac64-java17'){ - description('Run Eclipse SDK Tests for 64 bit Mac (and 64 bit VM and Eclipse)') + description('Run Eclipse SDK Tests for the platform implied by this job\'s name') logRotator { - daysToKeep(5) - numToKeep(10) + numToKeep(5) } parameters { @@ -116,13 +115,15 @@ echo JAVA_HOME: $JAVA_HOME echo ANT_HOME: $ANT_HOME echo PATH: $PATH - env 1>envVars.txt 2>&1 ant -diagnostics 1>antDiagnostics.txt 2>&1 java -XshowSettings -version 1>javaSettings.txt 2>&1 export eclipseArch=x86_64 -ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} -Dosgi.os=macosx -Dosgi.ws=cocoa -Dosgi.arch=x86_64 -DtestSuite=${testSuite} +ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} \\ + -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} \\ + -Dosgi.os=macosx -Dosgi.ws=cocoa -Dosgi.arch=${eclipseArch} \\ + -DtestSuite=${testSuite} RAW_DATE_END="$(date +%s )" diff --git a/JenkinsJobs/AutomatedTests/I_unit_macM1_java17.groovy b/JenkinsJobs/AutomatedTests/I_unit_macM1_java17.groovy index 6d65ba210e1..f16dd93431a 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_macM1_java17.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_macM1_java17.groovy @@ -6,7 +6,7 @@ for (STREAM in STREAMS){ def MINOR = STREAM.split('\\.')[1] job('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-macM1-java17'){ - description('Run Eclipse SDK Tests for 64 bit Mac (and 64 bit VM and Eclipse)') + description('Run Eclipse SDK Tests for the platform implied by this job\'s name') logRotator { numToKeep(5) @@ -116,12 +116,14 @@ echo PATH: $PATH export eclipseArch=aarch64 - env 1>envVars.txt 2>&1 ant -diagnostics 1>antDiagnostics.txt 2>&1 java -XshowSettings -version 1>javaSettings.txt 2>&1 -ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} -Dosgi.os=macosx -Dosgi.ws=cocoa -Dosgi.arch=aarch64 -DtestSuite=${testSuite} +ant -f getEBuilder.xml -Djava.io.tmpdir=${WORKSPACE}/tmp -DbuildId=$buildId -DeclipseStream=$STREAM -DEBUILDER_HASH=${EBUILDER_HASH} \\ + -DdownloadURL=https://download.eclipse.org/eclipse/downloads/drops4/${buildId} \\ + -Dosgi.os=macosx -Dosgi.ws=cocoa -Dosgi.arch=${eclipseArch} \\ + -DtestSuite=${testSuite} RAW_DATE_END="$(date +%s )" diff --git a/JenkinsJobs/AutomatedTests/I_unit_win32_java17.groovy b/JenkinsJobs/AutomatedTests/I_unit_win32_java17.groovy index e7d298df1c1..3ed807b398e 100644 --- a/JenkinsJobs/AutomatedTests/I_unit_win32_java17.groovy +++ b/JenkinsJobs/AutomatedTests/I_unit_win32_java17.groovy @@ -6,10 +6,10 @@ for (STREAM in STREAMS){ def MINOR = STREAM.split('\\.')[1] job('AutomatedTests/ep' + MAJOR + MINOR + 'I-unit-win32-java17'){ - description('Run Eclipse SDK Windows Tests ') + description('Run Eclipse SDK Tests for the platform implied by this job\'s name') logRotator { - numToKeep(25) + numToKeep(5) } parameters {