Jenkins &引用@&引用;字符生成错误无法分析文件
我目前在与jenkins一起构建时遇到了这个错误Jenkins &引用@&引用;字符生成错误无法分析文件,jenkins,laravel-blade,Jenkins,Laravel Blade,我目前在与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 %>--> 错误:无法分析文件:/var/lib/jenkins/workspace/vcl/r
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 %>-->
错误:无法分析文件:/var/lib/jenkins/workspace/vcl/resources/views/scr2131.blade.php
错误:第11行第23列的分析错误:
它只是这些刀片文件中的一个注释行(我使用的是laravel)。
这个文件是公共文件,很难有更改任何内容的权限。我能做些什么让詹金斯通过这个错误吗
我能做什么让詹金斯通过这个错误
詹金斯本身不解析这些文件
詹金斯的一个工作构建步骤
所以问题变成了:在解析php文件时,如何使这一步不失败
这取决于该步骤的实际内容:错误解析通常在执行过程中出现。您没有共享管道代码,因此很难具体说明,但您可以尝试在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将继续工作