Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
}
Expand Down Expand Up @@ -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 ->
Expand Down Expand Up @@ -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()})") {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
<version>2.1391.vb_93f2a_83691d</version>
<version>2.1395.v8534005506ec</version>
<relativePath />
</parent>
<groupId>io.jenkins.tools.bom</groupId>
Expand Down
10 changes: 8 additions & 2 deletions sample-plugin/check.groovy
Original file line number Diff line number Diff line change
@@ -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 ->
Expand Down Expand Up @@ -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()}"
Expand Down