我可以使用jenkins插件“警告ng”解析由“ ng Build&quot”产生的警告?

发布于 2025-02-13 07:49:25 字数 965 浏览 1 评论 0原文

我正在使用Jenkinsfile来测试和构建Angular WebApp。我还在使用警告下一代插件显示Lint-警告。但是,对于实际的构建战车,我仍然必须在控制台内观察。

- >我可以使用Jenkins插件“警告NG”来解析“ NG Build”产生的警告?

在以下代码 - 纽约书中,我显示了一个简化的Jenkins-Step,该步骤成功地创建了一个Linter报告,但无法解析ng构建的输出。


stage("Analysis"){          
    steps{
        nodejs(nodeJSInstallationName: 'nodejs') {
            sh 'npm ci'
            sh 'eslint src --ext .ts -f checkstyle > report/checkstyle-result.xml'
            sh 'ng build --configuration production > report/build.log'
            recordIssues tools: [
                                    esLint(pattern: 'report/checkstyle-result.xml') // <-- this works
                                    ngBuild(pattern: 'report/build.log') // <-- this tool doesn't exist!
                                ]
        }
    }
}

I am using a jenkinsfile to test and build an angular webapp. I am also using the Warnings Next Generation Plugin to show lint-warnings. But for actual build-warnings I still have to look inside the console-log.

--> Can I use the jenkins plugin "warnings ng" to parse warnings produced by "ng build"?

In the following code-snippet I show a simplified jenkins-step, that successfully creates a linter-report, but it can not parse the output of ng build.


stage("Analysis"){          
    steps{
        nodejs(nodeJSInstallationName: 'nodejs') {
            sh 'npm ci'
            sh 'eslint src --ext .ts -f checkstyle > report/checkstyle-result.xml'
            sh 'ng build --configuration production > report/build.log'
            recordIssues tools: [
                                    esLint(pattern: 'report/checkstyle-result.xml') // <-- this works
                                    ngBuild(pattern: 'report/build.log') // <-- this tool doesn't exist!
                                ]
        }
    }
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文