try catch test stage
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2024-08-28 14:12:26 -04:00
parent c030409202
commit feac6e4f02

63
Jenkinsfile vendored
View File

@ -29,32 +29,51 @@ pipeline {
sh 'cp ./docs-dist/html/docs.tar.gz /docs/docs.tar.gz && cd /docs/ && tar -xzvf ./docs.tar.gz'
}
}
stage('Test') {
steps {
wrap(
[
$class: 'Xvfb',
additionalOptions: '',
assignedLabels: '',
autoDisplayName: true,
debug: true,
displayNameOffset: 0,
installationName: 'Default',
parallelBuild: true,
screen: '1920x1080x24',
timeout: 25
]
) {
try {
try {
stage('Test') {
steps {
wrap(
[
$class: 'Xvfb',
additionalOptions: '',
assignedLabels: '',
autoDisplayName: true,
debug: true,
displayNameOffset: 0,
installationName: 'Default',
parallelBuild: true,
screen: '1920x1080x24',
timeout: 25
]
) {
sh 'mvn test -P integration'
} catch(err) {
sh 'mvn test -P integration -DmaxLogs'
}
}
post {
always {
junit testResults: 'target/surefire-reports/*.xml', keepLongStdio: true, testDataPublishers: [[$class:'AttachmentPublisher']]
}
}
}
post {
always {
junit testResults: 'target/surefire-reports/*.xml', keepLongStdio: true, testDataPublishers: [[$class:'AttachmentPublisher']]
} catch(err) {
stage('Debug Test Script') {
steps {
wrap(
[
$class: 'Xvfb',
additionalOptions: '',
assignedLabels: '',
autoDisplayName: true,
debug: true,
displayNameOffset: 0,
installationName: 'Default',
parallelBuild: true,
screen: '1920x1080x24',
timeout: 25
]
) {
sh 'mvn test -P integration -DmaxLogs'
}
}
}
}