Skip to content
Permalink
Browse files
add workaround for failing ITs due to
  • Loading branch information
kwin committed Mar 15, 2022
1 parent 0643ca9 commit 6e1e724165bbf2026a67eed96663ea3f7ac59ffc
Showing 2 changed files with 9 additions and 3 deletions.
@@ -50,14 +50,15 @@ class PipelineSupport implements Serializable {
}

def executeMaven(pipeline, String mavenArguments, boolean enablePublishers) {
executeMaven(pipeline, mainJdkVersion, mainMavenVersion, mavenArguments, enablePublishers)
executeMaven(pipeline, mainJdkVersion, mainMavenVersion, mavenArguments, '', enablePublishers)
}

static def executeMaven(pipeline, Integer jdkVersion, String mavenVersion, String mavenArguments, boolean enablePublishers) {
static def executeMaven(pipeline, Integer jdkVersion, String mavenVersion, String mavenArguments, String mavenOpts = '', boolean enablePublishers) {
pipeline.withMaven(
maven: AsfCloudbeesJenkinsEnvironment.getMavenLabel(!pipeline.isUnix(), mavenVersion),
jdk: AsfCloudbeesJenkinsEnvironment.getJdkLabel(jdkVersion),
mavenLocalRepo: '.repository',
mavenOpts: mavenOpts,
publisherStrategy: enablePublishers?'IMPLICIT':'EXPLICIT') {
if (pipeline.isUnix()) {
pipeline.sh "mvn -B ${mavenArguments}"
@@ -43,8 +43,13 @@ def call(List<String> additionalNodeLabels, List<Integer> additionalJdkVersions,
} else {
pipelineSupport.executeMaven(this, "install:install-file -Dfile=${jarFiles[0].path} -DpomFile=pom.xml", false)
}
String mavenOpts = '';
// workaround for https://bugs.openjdk.java.net/browse/JDK-8057894
if (!isUnix()) {
mavenOpts = '-Djava.security.egd=file:/dev/urandom';
}
// execute ITs
pipelineSupport.executeMaven(this, jdkVersion, mavenVersion, 'failsafe:integration-test failsafe:verify', false)
pipelineSupport.executeMaven(this, jdkVersion, mavenVersion, 'failsafe:integration-test failsafe:verify', mavenOpts, false)
} finally {
junit '**/target/failsafe-reports*/**/*.xml'
}

0 comments on commit 6e1e724

Please sign in to comment.