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/
|
||||
|
||||
.launchable
|
||||
|
|
|
@ -9,6 +9,9 @@ pipeline {
|
|||
buildDiscarder logRotator( numToKeepStr: '60' )
|
||||
disableRestartFromStage()
|
||||
}
|
||||
environment {
|
||||
LAUNCHABLE_TOKEN = credentials('launchable-token')
|
||||
}
|
||||
stages {
|
||||
stage("Parallel Stage") {
|
||||
parallel {
|
||||
|
@ -122,6 +125,8 @@ def mavenBuild(jdk, cmdline, mvnName) {
|
|||
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"
|
||||
if(saveHome()) {
|
||||
archiveArtifacts artifacts: ".repository/org/eclipse/jetty/jetty-home/**/jetty-home-*", allowEmptyArchive: true, onlyIfSuccessful: false
|
||||
|
@ -132,6 +137,8 @@ def mavenBuild(jdk, cmdline, mvnName) {
|
|||
finally
|
||||
{
|
||||
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'")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,8 +167,8 @@ def saveHome() {
|
|||
def websiteBuild() {
|
||||
script {
|
||||
try {
|
||||
if ( env.BRANCH_NAME == 'jetty-10.0.x' || env.BRANCH_NAME == 'jetty-11.0.x' || env.BRANCH_NAME == 'jetty-12.0.x' ) {
|
||||
build( job: 'website/jetty.website/main', propagate: false, wait: false )
|
||||
if (env.BRANCH_NAME == 'jetty-10.0.x' || env.BRANCH_NAME == 'jetty-11.0.x' || env.BRANCH_NAME == 'jetty-12.0.x') {
|
||||
build(job: 'website/jetty.website/main', propagate: false, wait: false)
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace()
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue