do not mark build as unstable if iqserver is not able to analyze

This commit is contained in:
Sebastian Sdorra
2019-12-19 11:01:12 +01:00
parent be6c3879bb
commit dce437b82e

8
Jenkinsfile vendored
View File

@@ -55,7 +55,13 @@ node('docker') {
if (isMainBranch()) {
stage('Lifecycle') {
nexusPolicyEvaluation iqApplication: selectedApplication('scm'), iqScanPatterns: [[scanPattern: 'scm-server/target/scm-server-app.zip']], iqStage: 'build'
try {
// failBuildOnNetworkError -> so we can catch the exception and neither fail nor make our build unstable
nexusPolicyEvaluation iqApplication: selectedApplication('scm'), iqScanPatterns: [[scanPattern: 'scm-server/target/scm-server-app.zip']], iqStage: 'build', failBuildOnNetworkError: true
} catch (Exception e) {
echo "ERROR: iQ Server policy eval failed. Not marking build unstable for now."
echo "ERROR: iQ Server Exception: ${e.getMessage()}"
}
}
stage('Archive') {