Skip to content

Commit e6589af

Browse files
committed
Use "additionalOptions" to skip Jacoco in Jenkinsfile
1 parent d32eeff commit e6589af

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Jenkinsfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ stage('Configure') {
4646
// We want to enable preview features when testing newer builds of OpenJDK:
4747
// even if we don't use these features, just enabling them can cause side effects
4848
// and it's useful to test that.
49-
new BuildEnvironment( testJdkVersion: '23', testJdkLauncherArgs: '--enable-preview', skipJacoco: true ),
50-
new BuildEnvironment( testJdkVersion: '24', testJdkLauncherArgs: '--enable-preview', skipJacoco: true ),
49+
new BuildEnvironment( testJdkVersion: '23', testJdkLauncherArgs: '--enable-preview', additionalOptions: '-PskipJacoco=true' ),
50+
new BuildEnvironment( testJdkVersion: '24', testJdkLauncherArgs: '--enable-preview', additionalOptions: '-PskipJacoco=true' ),
5151
// The following JDKs aren't supported by Hibernate ORM out-of-the box yet:
5252
// they require the use of -Dnet.bytebuddy.experimental=true.
5353
// Make sure to remove that argument as soon as possible
5454
// -- generally that requires upgrading bytebuddy after the JDK goes GA.
55-
new BuildEnvironment( testJdkVersion: '25', testJdkLauncherArgs: '--enable-preview -Dnet.bytebuddy.experimental=true', skipJacoco: true ),
55+
new BuildEnvironment( testJdkVersion: '25', testJdkLauncherArgs: '--enable-preview -Dnet.bytebuddy.experimental=true', additionalOptions: '-PskipJacoco=true' ),
5656
];
5757

5858
if ( env.CHANGE_ID ) {
@@ -142,10 +142,6 @@ stage('Build') {
142142
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
143143
" -Pci.node=${buildEnv.node}"
144144
}
145-
if ( buildEnv.skipJacoco ) {
146-
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
147-
" -PskipJacoco=true"
148-
}
149145
state[buildEnv.tag]['containerName'] = null;
150146
stage('Checkout') {
151147
checkout scm
@@ -232,7 +228,6 @@ class BuildEnvironment {
232228
String additionalOptions
233229
String notificationRecipients
234230
boolean longRunning
235-
boolean skipJacoco
236231

237232
String toString() { getTag() }
238233
String getTag() { "${node ? node + "_" : ''}${testJdkVersion ? 'jdk_' + testJdkVersion + '_' : '' }${dbName}" }

0 commit comments

Comments
 (0)