waa*_*919 3 hudson compiler-errors build-server jenkins
我已经Hudson
配置了构建项目。
构建后控制台输出如下:
Compiling ./main.py ...
Sorry: IndentationError: ('expected an indented block', ('./main.py', 8, 6, 'thread.start_new_thread( foo.FooThread, () )\n'))
Compiling ./udpReceiver.py ...
<<<<< build finished!
POST BUILD TASK : SUCCESS
END OF POST BUILD TASK : 0
Deleting project workspace...
done
Finished: SUCCESS
Run Code Online (Sandbox Code Playgroud)
正如您所看到的,我有一个缩进错误......并Hudson
表示构建作业已成功完成。
我想要的是这样的:
检查字符串“ IndentationError ”是否出现在控制台输出文本上...如果是这样,则构建应该是: 完成:失败!!!!!!!!
我怎样才能做到这一点?
我确认日志解析器插件可以完成将构建状态更改为失败的工作。
安装插件并为您的 Python 构建创建规则集,例如:
在创建 /var/lib/jenkins/logParserRules/python-error 文件中:
error /IndentationError/
Run Code Online (Sandbox Code Playgroud)
接下来,使用以下设置更新 Python 构建:
构建状态将更改为 FAILURE:
Compiling ./udpReceiver.py ...'
Sorry: IndentationError: ('expected an indented block', ('./main.py', 8, 6, 'thread.start_new_thread( foo.FooThread, () )\n'))
Compiling ./udpReceiver.py ...
Build step 'Console output (build log) parsing' changed build result to FAILURE
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
8113 次 |
最近记录: |