8
8
9
9
10
10
def withMavenWorkspace (Closure body ) {
11
- withMaven(jdk : ' OpenJDK 17 Latest' , maven : ' Apache Maven 3.9' ,
11
+ withMavenWorkspace(' OpenJDK 17 Latest' , body)
12
+ }
13
+
14
+ def withMavenWorkspace (jdk , Closure body ) {
15
+ withMaven(jdk : jdk, maven : ' Apache Maven 3.9' ,
12
16
mavenLocalRepo : env. WORKSPACE_TMP + ' /.m2repository' ,
13
17
options : [
14
18
// Artifacts are not needed and take up disk space
@@ -33,24 +37,57 @@ pipeline {
33
37
overrideIndexTriggers(false )
34
38
}
35
39
stages {
36
- stage(' Build reproducibility check' ) {
37
- agent {
38
- label ' Worker&&Containers'
39
- }
40
- steps {
41
- // The timeout cannot be in stage options, because that would
42
- // include the time needed to provision a node.
43
- timeout(time : 15 , unit : ' MINUTES' ) {
44
- withMavenWorkspace {
45
- echo " Generate the artifacts."
46
- sh " mvn clean install -Preproducibility-check"
40
+ stage (' Run checks' ) {
41
+ parallel {
42
+ stage(' Build reproducibility check' ) {
43
+ agent {
44
+ label ' Worker&&Containers'
45
+ }
46
+ steps {
47
+ // The timeout cannot be in stage options, because that would
48
+ // include the time needed to provision a node.
49
+ timeout(time : 15 , unit : ' MINUTES' ) {
50
+ withMavenWorkspace {
51
+ echo " Generate the artifacts."
52
+ sh " mvn clean install -Preproducibility-check"
53
+
54
+ echo " Running the reproducibility check."
55
+ sh """ mvn clean verify \
56
+ artifact:compare -Dreference.repo=hibernate-maven-central \
57
+ -Preproducibility-check \
58
+ --fail-at-end
59
+ """
60
+ }
61
+ }
62
+ }
63
+ }
64
+ stage(' Build with strict JAXP security settings' ) {
65
+ agent {
66
+ label ' Worker&&Containers'
67
+ }
68
+ steps {
69
+ script {
70
+ jdkVersion = ' OpenJDK 23 Latest'
71
+ }
72
+ // The timeout cannot be in stage options, because that would
73
+ // include the time needed to provision a node.
74
+ timeout(time : 15 , unit : ' MINUTES' ) {
75
+ withMavenWorkspace(jdkVersion, {
76
+ script {
77
+ compilerToolPath = tool(name : jdkVersion, type : ' jdk' )
78
+ jaxpStrictProperties = pwd(tmp : true ) + ' /jaxp-strict.properties'
79
+ }
80
+
81
+ echo " Copy strict JAXP configuration properties."
82
+ sh " cp $compilerToolPath /conf/jaxp-strict.properties.template $jaxpStrictProperties "
47
83
48
- echo " Running the reproducibility check."
49
- sh """ mvn clean verify \
50
- artifact:compare -Dreference.repo=hibernate-maven-central \
51
- -Preproducibility-check \
52
- --fail-at-end
53
- """
84
+ echo " Run a build with strict JAXP configuration."
85
+ sh """ mvn clean install \
86
+ -Dsurefire.jvm.args.jaxp.strict-args="-Djava.xml.config.file=$jaxpStrictProperties " \
87
+ -Djava-version.test.release=23
88
+ """
89
+ })
90
+ }
54
91
}
55
92
}
56
93
}
0 commit comments