Switch to Java 11 in the Jenkinsfiles

This commit is contained in:
Christian Beikov 2021-12-02 11:23:07 +01:00
parent 47416b9e24
commit 2977860fc9
3 changed files with 18 additions and 96 deletions

34
Jenkinsfile vendored
View File

@ -30,30 +30,30 @@ helper.runWithNotification {
stage('Configure') {
this.environments = [
// buildEnv('8', 'h2'),
// buildEnv('8', 'hsqldb'),
// buildEnv('8', 'derby'),
// buildEnv('8', 'mysql8'),
// buildEnv('8', 'mariadb'),
// buildEnv('8', 'postgresql_9_5'),
// buildEnv('8', 'postgresql_13'),
// buildEnv('8', 'oracle'),
buildEnv('8', 'oracle_ee'),
// buildEnv('8', 'db2'),
// buildEnv('8', 'mssql'),
// buildEnv('8', 'sybase'),
buildEnv('8', 'hana', 'HANA'),
buildEnv('8', 's390x', 's390x'),
buildEnv('8', 'tidb', 'tidb', 'tidb_hibernate@pingcap.com'),
// buildEnv('11', 'h2'),
// buildEnv('11', 'hsqldb'),
// buildEnv('11', 'derby'),
// buildEnv('11', 'mysql8'),
// buildEnv('11', 'mariadb'),
// buildEnv('11', 'postgresql_9_5'),
// buildEnv('11', 'postgresql_13'),
// buildEnv('11', 'oracle'),
buildEnv('11', 'oracle_ee'),
// buildEnv('11', 'db2'),
// buildEnv('11', 'mssql'),
// buildEnv('11', 'sybase'),
buildEnv('11', 'hana', 'HANA'),
buildEnv('11', 's390x', 's390x'),
buildEnv('11', 'tidb', 'tidb', 'tidb_hibernate@pingcap.com'),
// Disable EDB for now as the image is not available anymore
// buildEnv('8', 'edb')
// buildEnv('11', 'edb')
];
helper.configure {
file 'job-configuration.yaml'
// We don't require the following, but the build helper plugin apparently does
jdk {
defaultTool 'OpenJDK 8 Latest'
defaultTool 'OpenJDK 11 Latest'
}
maven {
defaultTool 'Apache Maven 3.8'

View File

@ -1,78 +0,0 @@
@Library('hibernate-jenkins-pipeline-helpers@1.5') _
pipeline {
agent {
label 'LongDuration'
}
tools {
jdk 'OpenJDK 8 Latest'
}
parameters {
booleanParam(name: 'NO_SLEEP', defaultValue: true, description: 'Whether the NO_SLEEP patch should be applied to speed up the TCK execution')
}
stages {
stage('Build') {
steps {
script {
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('openjdk:8-jdk').pull()
}
}
dir('hibernate') {
checkout scm
sh """ \
./gradlew publishToMavenLocal
"""
script {
env.HIBERNATE_VERSION = sh (
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
returnStdout: true
).trim()
}
}
dir('tck') {
checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/hibernate/jakarta-tck-runner.git']]]
sh """ \
cd jpa-2.2; docker build -t jakarta-tck-runner .
"""
}
}
}
stage('Run TCK') {
steps {
sh """ \
docker rm -f tck || true
docker rm -f tck-vol || true
docker volume create tck-vol
docker run -v ~/.m2/repository/org/hibernate:/root/.m2/repository/org/hibernate:z -v tck-vol:/tck/persistence-tck/tmp/:z -e NO_SLEEP=${params.NO_SLEEP} -e HIBERNATE_VERSION=$HIBERNATE_VERSION --name tck jakarta-tck-runner
docker cp tck:/tck/persistence-tck/tmp/ ./results
"""
archiveArtifacts artifacts: 'results/**'
script {
failures = sh (
script: """ \
set +x
while read line; do
if [[ "\$line" != *"Passed." ]]; then
echo "\$line"
fi
done <results/JTreport/text/summary.txt
""",
returnStdout: true
).trim()
if ( !failures.isEmpty() ) {
echo "Some TCK tests failed:"
echo failures
currentBuild.result = 'FAILURE'
}
}
}
}
}
post {
always {
// Space-separated
notifyBuildResult maintainers: 'christian.beikov@gmail.com'
}
}
}

View File

@ -5,7 +5,7 @@ pipeline {
label 'LongDuration'
}
tools {
jdk 'OpenJDK 8 Latest'
jdk 'OpenJDK 11 Latest'
}
parameters {
choice(name: 'IMAGE_JDK', choices: ['jdk11'], description: 'The JDK base image version to use for the TCK image.')