Collect Launchable test results on Windows (#8016)

This commit is contained in:
Basil Crow 2023-05-18 13:51:50 -07:00 committed by GitHub
parent d3f7958198
commit e1dca47fb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 12 deletions

23
Jenkinsfile vendored
View File

@ -32,12 +32,9 @@ stage('Record build') {
sh 'launchable verify && launchable record build --name ${BUILD_TAG} --source jenkinsci/jenkins=.'
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"
sh "launchable record session --build ${env.BUILD_TAG} --flavor platform=${platform} --flavor jdk=${jdk} >${sessionFile}"
stash name: sessionFile, includes: sessionFile
}
def sessionFile = "launchable-session-${platform}-jdk${jdk}.txt"
sh "launchable record session --build ${env.BUILD_TAG} --flavor platform=${platform} --flavor jdk=${jdk} >${sessionFile}"
stash name: sessionFile, includes: sessionFile
}
}
@ -169,13 +166,15 @@ axes.values().combinations {
)
}
}
// TODO https://github.com/jenkins-infra/helpdesk/issues/3484
if (platform != 'windows') {
withCredentials([string(credentialsId: 'launchable-jenkins-jenkins', variable: 'LAUNCHABLE_TOKEN')]) {
def sessionFile = "launchable-session-${platform}-jdk${jdk}.txt"
unstash sessionFile
def session = readFile(sessionFile).trim()
withCredentials([string(credentialsId: 'launchable-jenkins-jenkins', variable: 'LAUNCHABLE_TOKEN')]) {
def sessionFile = "launchable-session-${platform}-jdk${jdk}.txt"
unstash sessionFile
def session = readFile(sessionFile).trim()
if (isUnix()) {
sh "launchable verify && launchable record tests --session ${session} --flavor platform=${platform} --flavor jdk=${jdk} maven './**/target/surefire-reports'"
} else {
// TODO launchable.exe still not working for some reason
bat "python -m launchable verify && python -m launchable record tests --session ${session} --flavor platform=${platform} --flavor jdk=${jdk} maven ./**/target/surefire-reports"
}
}
}