我在使用jenkins构建时遇到此错误
ERROR: Unable to parse file: /var/lib/jenkins/workspace/vcl/resources/views/scr2131.blade.php
ERROR: Parse error at line 11 column 23:
<!-- <% unless @max_results %>-->
它只是那些刀片文件中的注释行(我正在使用laravel)。此文件是常用文件,很难获得更改任何内容的权限。我能做些什么让Jenkins传递这个错误吗?
我能做到让詹金斯传递这个错误吗?
Jenkins本身不会解析这些文件。
您的Jenkins作业构建步骤之一。
所以问题就变成了:在解析那个php文件时,如何让这一步不失败。
这取决于实际上是什么步骤:在SonarQube analysis as this one期间经常会看到错误解析。
您没有共享管道代码,因此很难具体,但您可以尝试包含导致try块内出现问题的行,而不是捕获和抑制错误
try {
//put problematic parse command here
}
catch(Exception e) {
println "suppressing error."
//you can also add validation if the error is the one which you expected. If not you may rethrow the error.
}
如果抓住并处理了异常,Jenkins将继续这项工作。