Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins 异常捕获_Jenkins_Groovy_Sonarqube_Devops_Sonarqube Scan - Fatal编程技术网

Jenkins 异常捕获

Jenkins 异常捕获,jenkins,groovy,sonarqube,devops,sonarqube-scan,Jenkins,Groovy,Sonarqube,Devops,Sonarqube Scan,您好,到目前为止,我使用这个规则 用于捕获与SonarQube代码检查无关的异常。 你们能建议我应该包括的常见异常,如果出于未知原因而等待质量门,那么除了代码 try { steps.timeout(time: 10, unit: 'MINUTES') { steps.waitForQualityGate abortPipeline: true } } catch (IllegalStateException exception) { state.s

您好,到目前为止,我使用这个规则 用于捕获与SonarQube代码检查无关的异常。 你们能建议我应该包括的常见异常,如果出于未知原因而等待质量门,那么除了代码

   try {
        steps.timeout(time: 10, unit: 'MINUTES') { steps.waitForQualityGate abortPipeline: true }
    } catch (IllegalStateException exception) {
        state.setPipelineErrorMessage("${exception}")
        steps.unstable('Not a code issue. Build will be Unstable!')
    

我不确定您到底在问什么,但是我们在超时块周围使用的catch块正在检查“FlowInterruptedException”(org.jenkinsci.plugins.workflow.steps.FlowInterruptedException)。这就是计时器过期时抛出的内容