Jenkins Pipeline的GNU C编译器4(gcc)语法/配置

问题描述 投票:0回答:1

在将我现有的所有Jenkins工作转换为Pipeline工作时,我遇到了在后期构建操作中执行Scan for compiler warnings的步骤,如下面的屏幕截图所示。

enter image description here

我为此尝试了很多语法,但它没有锻炼。 有没有人知道管道中的这个语法?

gcc jenkins groovy jenkins-pipeline
1个回答
0
投票

经过多次尝试后,我找到了可行的脚本。

post {
    always {
            step([$class: 'WarningsPublisher',
            consoleParsers: [[parserName:'GNU C Compiler 4 (gcc)']],
            defaultEncoding: '',
            excludePattern: '',
            healthy: '',
            includePattern: '',
            messagesPattern: '',
            unHealthy: '',
            useStableBuildAsReference: true
        ])
    }
}

上面的脚本经过测试,效果很好。

© www.soinside.com 2019 - 2024. All rights reserved.