Skip to content

Commit

Permalink
Parameterize Jenkins TCK pipelines and upload Jakarta JPA TCK results
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Jun 2, 2021
1 parent bf48b81 commit 828afd3
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 9 deletions.
14 changes: 10 additions & 4 deletions ci/jpa-2.2-tck.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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()
Expand Down
19 changes: 14 additions & 5 deletions ci/jpa-3.0-tck.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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} .
"""
}
}
Expand All @@ -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()
Expand Down
58 changes: 58 additions & 0 deletions tck/summary.md
Original file line number Diff line number Diff line change
@@ -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] ********************************************************************************
```

0 comments on commit 828afd3

Please sign in to comment.