Skip to content

Commit

Permalink
[I-Build-Tests] Unify description, parameter and log-rotation specs
Browse files Browse the repository at this point in the history
and split some long lines.
  • Loading branch information
HannesWell committed Apr 29, 2024
1 parent 4ad9a3a commit 67c27f4
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 61 deletions.
38 changes: 21 additions & 17 deletions JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java17.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'){
Expand Down Expand Up @@ -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 )"
Expand All @@ -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}")
]
}
}
}
Expand Down
38 changes: 21 additions & 17 deletions JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java21.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'){
Expand Down Expand Up @@ -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 )"
Expand All @@ -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}")
]
}
}
}
Expand Down
38 changes: 21 additions & 17 deletions JenkinsJobs/AutomatedTests/I_unit_cen64_gtk3_java22.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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'){
Expand Down Expand Up @@ -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 )"
Expand All @@ -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}")
]
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions JenkinsJobs/AutomatedTests/I_unit_mac64_java17.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 )"
Expand Down
8 changes: 5 additions & 3 deletions JenkinsJobs/AutomatedTests/I_unit_macM1_java17.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 )"
Expand Down
4 changes: 2 additions & 2 deletions JenkinsJobs/AutomatedTests/I_unit_win32_java17.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 67c27f4

Please sign in to comment.