grunt html验证器:避免在连接超时 /重置上将jenkins mark构建为失败



我正在使用:https://www.npmjs.com/package/grunt-html-validation

这是我在grunt中的验证任务:

validation: {
        partial: {
            options: {
                reset: grunt.option('reset') || true,
                stoponerror: false,
                failHard: true,
                maxTry: 1,
                doctype: 'HTML5',
                relaxerror: []
            },
            files: {
                src: [
                    'apps/www/partials/*.html',
                    'apps/www/partials/**/*.html'
                ]
            }
        },

在大量构建后,W3C拒绝了连接,这很好,但由于这个原因,我不想在Jenkins中构建失败:

错误:32MValidation为.. [39mapps/www/partials/Asset-library.html [31mfatal错误:阅读 Econnreset [39m

考虑 text-finder插件。让您的测试产生0个退出代码(以便构建不会完全失败)。然后在Text-Finder插件中配置REGEX,以搜索您的控制台日志(或其他工作区文件)。

以搜索所有测试故障结果(连接超时)搜索正则态度。如果发现,请标记构建FAILED(或UNSTABLE优先区分构建故障与测试故障)

最新更新