diff --git a/Jenkinsfile b/Jenkinsfile index d65fd8f91..b02313796 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -88,7 +88,7 @@ mavenEnv(jdk: 21) { bash prep.sh ''' } - if (junit(testResults: '**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml').failCount > 0) { + if (junit(testResults: '**/target/surefire-reports/TEST-*.xml,**/target/failsafe-reports/TEST-*.xml').failCount> 0) { error 'Some test failures during prep.sh, not going to continue' } } @@ -126,7 +126,9 @@ mavenEnv(jdk: 21) { } } echo "${splits.size()} split(s)" - echo splits.collect { split, repositories -> "${split} (${repositories.size()}) ${repositories}" }.join('\n') + echo splits.collect { split, repositories -> + "${split} (${repositories.size()}) ${repositories}" + }.join('\n') } stage('stash line(s)') { lines.each { line -> @@ -155,7 +157,7 @@ if (BRANCH_NAME == 'master' || fullTest || weeklyTest) { def combination = "${repository}:${line}" // if the tests ran with success in a previous attempt, skip the combination (ex: in case of reclaimed spot agent) def previousResult = results[combination] ?: [totalCount: 0, failCount: 0] - if (previousResult.totalCount > 0 && previousResult.failCount == 0) { + if (previousResult.totalCount> 0 && previousResult.failCount == 0) { echo "${combination} has already ran ${previousResult.totalCount} test(s) with success in a previous attempt, skipping" } else { stage("${combination} (${idx + 1}/${repositories.size()})") { diff --git a/pom.xml b/pom.xml index 4e21ea5d5..f6a27fa5d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jenkins-ci jenkins - 2.1391.vb_93f2a_83691d + 2.1395.v8534005506ec io.jenkins.tools.bom diff --git a/sample-plugin/check.groovy b/sample-plugin/check.groovy index f26edb97a..15b4b0dc9 100644 --- a/sample-plugin/check.groovy +++ b/sample-plugin/check.groovy @@ -1,7 +1,11 @@ def managedDeps = project.dependencyManagement.dependencies*.managementKey println "Managed dependencies of $project: $managedDeps" // Cannot use project.artifactMap since this ignores classifiers so has entries like org.jenkins-ci.plugins.workflow:workflow-step-api → org.jenkins-ci.plugins.workflow:workflow-step-api:jar:tests:2.20:test -def artifactMap = project.artifacts.grep {!it.hasClassifier()}.collectEntries {art -> ["$art.groupId:$art.artifactId".toString(), art]} +def artifactMap = project.artifacts.grep { + !it.hasClassifier() +}.collectEntries {art -> + ["$art.groupId:$art.artifactId".toString(), art] +} assert artifactMap['junit:junit'] == project.artifactMap['junit:junit'] def managedPluginDeps = managedDeps.collect {stripAllButGA(it)}.grep { ga -> @@ -45,7 +49,9 @@ project.artifacts.each { art -> if (plugin == null) { return } - for (String intermediate : art.dependencyTrail.drop(1).dropRight(1).collect {stripAllButGA(it)}) { + for (String intermediate : art.dependencyTrail.drop(1).dropRight(1).collect { + stripAllButGA(it) + }) { def intermediateArt = artifactMap[intermediate] if (intermediateArt == null) { println "Cannot find intermediate artifact $intermediate to check among ${artifactMap.keySet()}"