Skip to content

Commit

Permalink
Jenkins pipelines refresh (#1233)
Browse files Browse the repository at this point in the history
JDK upgrade, post build actions to capture compiler, JavaDoc, SpotBugs messages.

Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
  • Loading branch information
rfelcman committed Aug 6, 2021
1 parent 44f8f2c commit 60ccb27
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 30 deletions.
45 changes: 22 additions & 23 deletions etc/jenkins/build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ spec:
}
tools {
maven 'apache-maven-latest'
jdk 'adoptopenjdk-hotspot-jdk11-latest'
jdk 'openjdk-jdk17-latest'
}
stages {
// Initialize build environment
Expand Down Expand Up @@ -183,32 +183,31 @@ spec:
}
}
}
stage('Proceed test results') {
steps {
script {
//Multiple Jenkins junit plugin calls due java.nio.channels.ClosedChannelException in new/cloud Eclipse.org build infrastructure if it's called once
//Retry is there to try (in case of crash) junit test upload again.
retryCount = 5
junitReportFiles = [
'bundles/**/target/surefire-reports/*.xml,bundles/**/target/failsafe-reports/*.xml',
'dbws/**/target/surefire-reports/*.xml,dbws/**/target/failsafe-reports/*.xml',
'foundation/**/target/surefire-reports/*.xml,foundation/**/target/failsafe-reports/*.xml',
'jpa/**/target/surefire-reports/*.xml,jpa/**/target/failsafe-reports/*.xml',
'moxy/**/target/surefire-reports/*.xml,moxy/**/target/failsafe-reports/*.xml',
'sdo/**/target/surefire-reports/*.xml,sdo/**/target/failsafe-reports/*.xml',
'utils/**/target/surefire-reports/*.xml,utils/**/target/failsafe-reports/*.xml'
]
for (item in junitReportFiles) {
echo 'Processing file: ' + item
retry(retryCount) {
junit allowEmptyResults: true, testResults: item
}
}
post {
always{
script {
//Multiple Jenkins junit plugin calls due java.nio.channels.ClosedChannelException in new/cloud Eclipse.org build infrastructure if it's called once
//Retry is there to try (in case of crash) junit test upload again.
retryCount = 5
junitReportFiles = [
'bundles/**/target/surefire-reports/*.xml,bundles/**/target/failsafe-reports/*.xml',
'dbws/**/target/surefire-reports/*.xml,dbws/**/target/failsafe-reports/*.xml',
'foundation/**/target/surefire-reports/*.xml,foundation/**/target/failsafe-reports/*.xml',
'jpa/**/target/surefire-reports/*.xml,jpa/**/target/failsafe-reports/*.xml',
'moxy/**/target/surefire-reports/*.xml,moxy/**/target/failsafe-reports/*.xml',
'sdo/**/target/surefire-reports/*.xml,sdo/**/target/failsafe-reports/*.xml',
'utils/**/target/surefire-reports/*.xml,utils/**/target/failsafe-reports/*.xml'
]
for (item in junitReportFiles) {
echo 'Processing file: ' + item
retry(retryCount) {
junit allowEmptyResults: true, testResults: item
}
}
}
recordIssues(tools: [spotBugs(useRankAsPriority: true), java(), javaDoc()])
}
}
post {
// Send a mail on unsuccessful and fixed builds
unsuccessful { // means unstable || failure || aborted
emailext subject: 'Build $BUILD_STATUS $PROJECT_NAME #$BUILD_NUMBER failed!',
Expand Down
3 changes: 2 additions & 1 deletion etc/jenkins/pr_verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
}
tools {
maven 'apache-maven-latest'
jdk 'adoptopenjdk-hotspot-latest'
jdk 'openjdk-jdk17-latest'
}
stages {
// Initialize build environment
Expand Down Expand Up @@ -246,6 +246,7 @@ spec:
}
}
}
recordIssues(tools: [spotBugs(useRankAsPriority: true), java(), javaDoc()])
}
}
}
8 changes: 4 additions & 4 deletions etc/jenkins/release.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ spec:
- name: jnlp
resources:
limits:
memory: "1Gi"
memory: "2Gi"
cpu: "1"
requests:
memory: "1Gi"
memory: "2Gi"
cpu: "500m"
- name: el-build
resources:
limits:
memory: "2Gi"
memory: "4Gi"
cpu: "2"
requests:
memory: "2Gi"
memory: "4Gi"
cpu: "1.5"
image: tkraus/el-build:1.1.9
volumeMounts:
Expand Down
3 changes: 1 addition & 2 deletions etc/jenkins/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ HELP_PLUGIN='org.apache.maven.plugins:maven-help-plugin:3.1.0'
# $5 - OVERWRITE_STAGING - Allows to overwrite existing version in OSSRH (Jakarta) staging repositories

echo '-[ EclipseLink Release ]-----------------------------------------------------------'
. /etc/profile

ECLIPSELINK_VERSION="${1}"
NEXT_ECLIPSELINK_VERSION="${2}"
Expand Down Expand Up @@ -97,7 +96,7 @@ fi

echo '-[ Build project mvn clean install ]-----------------------------'
#This step is needed to populate local Maven repository with required but not deployed artifacts
mvn --no-transfer-progress -DskipTests clean install
mvn --no-transfer-progress -V -DskipTests clean install
#Deploy selected artifacts. There is Maven property -Ddeploy to control which modules will be deployed
echo '-[ Deploy artifacts to staging repository ]-----------------------------'
# Verify, sign and deploy release
Expand Down

0 comments on commit 60ccb27

Please sign in to comment.