using catch on tests in jenkins
This commit is contained in:
parent
c834c73802
commit
0355c35d41
|
@ -4,7 +4,12 @@ node {
|
|||
stage 'Install dependencies'
|
||||
sh 'npm install'
|
||||
stage 'Run tests'
|
||||
sh 'npm test || true'
|
||||
step([$class: 'JUnitResultArchiver', testResults: 'target/*.xml'])
|
||||
step([$class: 'ArtifactArchiver', artifacts: 'coverage/**/*', fingerprint: true])
|
||||
try {
|
||||
sh 'npm test'
|
||||
} catch(Exception ex) {
|
||||
echo ex
|
||||
} finally {
|
||||
step([$class: 'JUnitResultArchiver', testResults: 'target/*.xml'])
|
||||
step([$class: 'ArtifactArchiver', artifacts: 'coverage/**/*', fingerprint: true])
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue