Jetty 12.0.x test launchable to detect flaky tests (#11983)
* test launchable Signed-off-by: Olivier Lamy <olamy@apache.org> --------- Signed-off-by: Olivier Lamy <olamy@apache.org>
This commit is contained in:
parent
1a43fbac7c
commit
7be30e0b15
|
@ -52,3 +52,5 @@ bin/
|
||||||
|
|
||||||
# reports
|
# reports
|
||||||
reports/
|
reports/
|
||||||
|
|
||||||
|
.launchable
|
||||||
|
|
|
@ -9,6 +9,9 @@ pipeline {
|
||||||
buildDiscarder logRotator( numToKeepStr: '60' )
|
buildDiscarder logRotator( numToKeepStr: '60' )
|
||||||
disableRestartFromStage()
|
disableRestartFromStage()
|
||||||
}
|
}
|
||||||
|
environment {
|
||||||
|
LAUNCHABLE_TOKEN = credentials('launchable-token')
|
||||||
|
}
|
||||||
stages {
|
stages {
|
||||||
stage("Parallel Stage") {
|
stage("Parallel Stage") {
|
||||||
parallel {
|
parallel {
|
||||||
|
@ -122,6 +125,8 @@ def mavenBuild(jdk, cmdline, mvnName) {
|
||||||
extraArgs = " -Dmaven.test.failure.ignore=true "
|
extraArgs = " -Dmaven.test.failure.ignore=true "
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
runLaunchable ("verify")
|
||||||
|
runLaunchable ("record build --name $BRANCH_NAME")
|
||||||
sh "mvn $extraArgs -DsettingsPath=$GLOBAL_MVN_SETTINGS -Dmaven.repo.uri=http://nexus-service.nexus.svc.cluster.local:8081/repository/maven-public/ -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -U $cmdline"
|
sh "mvn $extraArgs -DsettingsPath=$GLOBAL_MVN_SETTINGS -Dmaven.repo.uri=http://nexus-service.nexus.svc.cluster.local:8081/repository/maven-public/ -ntp -s $GLOBAL_MVN_SETTINGS -Dmaven.repo.local=.repository -Pci -V -B -e -U $cmdline"
|
||||||
if(saveHome()) {
|
if(saveHome()) {
|
||||||
archiveArtifacts artifacts: ".repository/org/eclipse/jetty/jetty-home/**/jetty-home-*", allowEmptyArchive: true, onlyIfSuccessful: false
|
archiveArtifacts artifacts: ".repository/org/eclipse/jetty/jetty-home/**/jetty-home-*", allowEmptyArchive: true, onlyIfSuccessful: false
|
||||||
|
@ -132,6 +137,8 @@ def mavenBuild(jdk, cmdline, mvnName) {
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
junit testResults: '**/target/surefire-reports/**/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true
|
junit testResults: '**/target/surefire-reports/**/*.xml,**/target/invoker-reports/TEST*.xml', allowEmptyResults: true
|
||||||
|
echo "Launchable record tests"
|
||||||
|
runLaunchable ("record tests --build $BRANCH_NAME maven '**/target/surefire-reports/**/*.xml' '**/target/invoker-reports/TEST*.xml'")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,5 +176,17 @@ def websiteBuild() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* run launchable with args and ignore any errors
|
||||||
|
* @param args
|
||||||
|
*/
|
||||||
|
def runLaunchable(args) {
|
||||||
|
try {
|
||||||
|
sh "launchable $args"
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace()
|
||||||
|
echo "skip failure running Launchable: " + e.getMessage()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// vim: et:ts=2:sw=2:ft=groovy
|
// vim: et:ts=2:sw=2:ft=groovy
|
||||||
|
|
Loading…
Reference in New Issue