mirror of https://github.com/jenkinsci/jenkins.git
Fix Launchable test result collection (#7919)
This commit is contained in:
parent
550a982a5e
commit
be7ad434db
|
@ -12,6 +12,11 @@ properties([
|
||||||
disableConcurrentBuilds(abortPrevious: true)
|
disableConcurrentBuilds(abortPrevious: true)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
def axes = [
|
||||||
|
platforms: ['linux', 'windows'],
|
||||||
|
jdks: [11, 17, 19],
|
||||||
|
]
|
||||||
|
|
||||||
stage('Record build') {
|
stage('Record build') {
|
||||||
retry(conditions: [kubernetesAgent(handleNonKubernetes: true), nonresumable()], count: 2) {
|
retry(conditions: [kubernetesAgent(handleNonKubernetes: true), nonresumable()], count: 2) {
|
||||||
node('maven-11') {
|
node('maven-11') {
|
||||||
|
@ -27,6 +32,15 @@ stage('Record build') {
|
||||||
* TODO Add the commits of the transitive closure of the Jenkins WAR under test to this build.
|
* TODO Add the commits of the transitive closure of the Jenkins WAR under test to this build.
|
||||||
*/
|
*/
|
||||||
launchable("record build --name ${env.BUILD_TAG} --source jenkinsci/jenkins=. --link \"View build in CI\"=${env.BUILD_URL}")
|
launchable("record build --name ${env.BUILD_TAG} --source jenkinsci/jenkins=. --link \"View build in CI\"=${env.BUILD_URL}")
|
||||||
|
axes.values().combinations {
|
||||||
|
def (platform, jdk) = it
|
||||||
|
// TODO https://github.com/jenkins-infra/helpdesk/issues/3484
|
||||||
|
if (platform != 'windows') {
|
||||||
|
def sessionFile = "launchable-session-${platform}-jdk${jdk}.txt"
|
||||||
|
launchable("record session --build ${env.BUILD_TAG} --flavor platform=${platform} --flavor jdk=${jdk} --link \"View session in CI\"=${env.BUILD_URL} >${sessionFile}")
|
||||||
|
stash name: sessionFile, includes: sessionFile
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -46,10 +60,6 @@ stage('Record build') {
|
||||||
|
|
||||||
def builds = [:]
|
def builds = [:]
|
||||||
|
|
||||||
def axes = [
|
|
||||||
platforms: ['linux', 'windows'],
|
|
||||||
jdks: [11, 17, 19],
|
|
||||||
]
|
|
||||||
axes.values().combinations {
|
axes.values().combinations {
|
||||||
def (platform, jdk) = it
|
def (platform, jdk) = it
|
||||||
if (platform == 'windows' && jdk != 17) {
|
if (platform == 'windows' && jdk != 17) {
|
||||||
|
@ -149,11 +159,6 @@ axes.values().combinations {
|
||||||
skipBlames: true,
|
skipBlames: true,
|
||||||
trendChartType: 'TOOLS_ONLY',
|
trendChartType: 'TOOLS_ONLY',
|
||||||
qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]])
|
qualityGates: [[threshold: 1, type: 'TOTAL', unstable: true]]])
|
||||||
launchable.install()
|
|
||||||
withCredentials([string(credentialsId: 'launchable-jenkins-jenkins', variable: 'LAUNCHABLE_TOKEN')]) {
|
|
||||||
launchable('verify')
|
|
||||||
launchable("record tests --build ${env.BUILD_TAG} --flavor platform=${platform} --flavor jdk=${jdk} --link \"View session in CI\"=${env.BUILD_URL} maven './**/target/surefire-reports'")
|
|
||||||
}
|
|
||||||
if (failFast && currentBuild.result == 'UNSTABLE') {
|
if (failFast && currentBuild.result == 'UNSTABLE') {
|
||||||
error 'Static analysis quality gates not passed; halting early'
|
error 'Static analysis quality gates not passed; halting early'
|
||||||
}
|
}
|
||||||
|
@ -167,6 +172,17 @@ axes.values().combinations {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO https://github.com/jenkins-infra/helpdesk/issues/3484
|
||||||
|
if (platform != 'windows') {
|
||||||
|
launchable.install()
|
||||||
|
withCredentials([string(credentialsId: 'launchable-jenkins-jenkins', variable: 'LAUNCHABLE_TOKEN')]) {
|
||||||
|
launchable('verify')
|
||||||
|
def sessionFile = "launchable-session-${platform}-jdk${jdk}.txt"
|
||||||
|
unstash sessionFile
|
||||||
|
def session = readFile(sessionFile).trim()
|
||||||
|
launchable("record tests --session ${session} --flavor platform=${platform} --flavor jdk=${jdk} --link \"View session in CI\"=${env.BUILD_URL} maven './**/target/surefire-reports'")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue