Parameterize Jenkins TCK pipelines and upload Jakarta JPA TCK results

This commit is contained in:
Christian Beikov 2021-06-02 12:12:16 +02:00
parent bf48b81422
commit 828afd348d
3 changed files with 82 additions and 9 deletions

View File

@ -7,6 +7,9 @@ pipeline {
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 {
@ -39,18 +42,21 @@ pipeline {
steps {
sh """ \
docker rm -f tck || true
docker run -v ~/.m2/repository/org/hibernate:/root/.m2/repository/org/hibernate:z -e NO_SLEEP=true -e HIBERNATE_VERSION=$HIBERNATE_VERSION --name tck jakarta-tck-runner
docker cp tck:/tck/persistence-tck/tmp/JTreport/ ./JTreport
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: 'JTreport/**'
archiveArtifacts artifacts: 'results/**'
script {
failures = sh (
script: """ \
set +x
while read line; do
if [[ "\$line" != *"Passed." ]]; then
echo "\$line"
fi
done <JTreport/text/summary.txt
done <results/JTreport/text/summary.txt
""",
returnStdout: true
).trim()

View File

@ -7,6 +7,12 @@ pipeline {
tools {
jdk 'OpenJDK 8 Latest'
}
parameters {
string(name: 'BASE_IMAGE', defaultValue: 'openjdk:8-jdk', description: 'The JDK base image to use for the image i.e. `openjdk:11-jdk`')
string(name: 'TCK_VERSION', defaultValue: '3.0.0', description: 'The version of the Jakarta JPA TCK i.e. `2.2.0` or `3.0.1`')
string(name: 'TCK_SHA', defaultValue: 'b08c8887f00306f8bb7ebe54c4c810f3452519f5395733637ccc639b5081aebf', description: 'The SHA256 of the Jakarta JPA TCK that is distributed under https://download.eclipse.org/jakartaee/persistence/3.0/jakarta-persistence-tck-${TCK_VERSION}.zip.sha256')
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 {
@ -30,7 +36,7 @@ pipeline {
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-3.0; docker build -t jakarta-tck-runner .
cd jpa-3.0; docker build -t jakarta-tck-runner --build-arg JDK_IMAGE=${params.BASE_IMAGE} --build-arg TCK_VERSION=${params.TCK_VERSION} --build-arg TCK_SHA=${params.TCK_SHA} .
"""
}
}
@ -39,18 +45,21 @@ pipeline {
steps {
sh """ \
docker rm -f tck || true
docker run -v ~/.m2/repository/org/hibernate:/root/.m2/repository/org/hibernate:z -e NO_SLEEP=true -e HIBERNATE_VERSION=$HIBERNATE_VERSION --name tck jakarta-tck-runner
docker cp tck:/tck/persistence-tck/tmp/JTreport/ ./JTreport
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: 'JTreport/**'
archiveArtifacts artifacts: 'results/**'
script {
failures = sh (
script: """ \
set +x
while read line; do
if [[ "\$line" != *"Passed." ]]; then
echo "\$line"
fi
done <JTreport/text/summary.txt
done <results/JTreport/text/summary.txt
""",
returnStdout: true
).trim()

58
tck/summary.md Normal file
View File

@ -0,0 +1,58 @@
# Hibernate ORM's TCK Results
As required by the [Eclipse Foundation Technology Compatibility Kit License](https://www.eclipse.org/legal/tck.php),
following is a summary of the TCK results for releases of Hibernate ORM.
## 5.5.0.Final Certification Request for Jakarta Persistence 3.0
* Organization Name ("Organization") and, if applicable, URL: Red Hat
* Product Name, Version and download URL (if applicable): [Hibernate ORM 5.5.0.Final](http://hibernate.org/orm/releases/5.5/)
* Specification Name, Version and download URL: [Jakarta Persistence 3.0](https://jakarta.ee/specifications/persistence/3.0/)
* TCK Version, digital SHA-256 fingerprint and download URL: [Jakarta Persistence TCK 3.0.0](https://download.eclipse.org/jakartaee/persistence/3.0/jakarta-persistence-tck-3.0.0.zip), SHA-256: b08c8887f00306f8bb7ebe54c4c810f3452519f5395733637ccc639b5081aebf
* Public URL of TCK Results Summary: [TCK results summary](https://github.com/hibernate/hibernate-orm/blob/main/tck/summary.md)
* Any Additional Specification Certification Requirements: None
* Java runtime used to run the implementation: Oracle JDK 1.8.0_292-b10
* Summary of the information for the certification environment, operating system, cloud, ...: Apache Derby 10.13.1.1, Linux
* I acknowledge that the Organization I represent accepts the terms of the [EFTL](https://www.eclipse.org/legal/tck.php).
* I attest that all TCK requirements have been met, including any compatibility rules.
Test results:
```
[javatest.batch] ********************************************************************************
[javatest.batch] Number of tests completed: 2055 (2055 passed, 0 failed, 0 with errors)
[javatest.batch] Number of tests remaining: 3
[javatest.batch] ********************************************************************************
[javatest.batch] Completed running 2055 tests.
[javatest.batch] Number of Tests Passed = 2055
[javatest.batch] Number of Tests Failed = 0
[javatest.batch] Number of Tests with Errors = 0
[javatest.batch] ********************************************************************************
```
## 5.5.0.Final Certification Request for Jakarta Persistence 2.2
* Organization Name ("Organization") and, if applicable, URL: Red Hat
* Product Name, Version and download URL (if applicable): [Hibernate ORM 5.5.0.Final](http://hibernate.org/orm/releases/5.5/)
* Specification Name, Version and download URL: [Jakarta Persistence 2.2](https://jakarta.ee/specifications/persistence/2.2/)
* TCK Version, digital SHA-256 fingerprint and download URL: [Jakarta Persistence TCK 2.2.0](https://download.eclipse.org/jakartaee/persistence/2.2/jakarta-persistence-tck-2.2.0.zip), SHA-256: c9cdc30e0e462e875c80f0bd46b964dd8aa8c2a3b69ade49d11df7652f3b5c39
* Public URL of TCK Results Summary: [TCK results summary](https://github.com/hibernate/hibernate-orm/blob/main/tck/summary.md)
* Any Additional Specification Certification Requirements: None
* Java runtime used to run the implementation: Oracle JDK 1.8.0_292-b10
* Summary of the information for the certification environment, operating system, cloud, ...: Apache Derby 10.13.1.1, Linux
* I acknowledge that the Organization I represent accepts the terms of the [EFTL](https://www.eclipse.org/legal/tck.php).
* I attest that all TCK requirements have been met, including any compatibility rules.
Test results:
```
[javatest.batch] ********************************************************************************
[javatest.batch] Number of tests completed: 2055 (2055 passed, 0 failed, 0 with errors)
[javatest.batch] Number of tests remaining: 3
[javatest.batch] ********************************************************************************
[javatest.batch] Completed running 2055 tests.
[javatest.batch] Number of Tests Passed = 2055
[javatest.batch] Number of Tests Failed = 0
[javatest.batch] Number of Tests with Errors = 0
[javatest.batch] ********************************************************************************
```