我有一个脚本,一旦运行它便在多台服务器中进行“构建”。我现在试图弄清楚如何知道构建是否失败。例如,脚本将运行3个命令(如下所示),我如何知道我的预构建是否失败?
在构建过程中,我必须运行以下命令:
./ant pre-build
./ant install1
./ant post-build
我可以在Redhat机器上使用ssh,puppet等,并且除此之外没有其他功能。是否有应用程序或管理工具可让我在UI中监视构建过程?
最佳答案
您可以按照Running Apache Ant所述检查ant可执行文件的返回码:
the ant start up scripts (in their Windows and Unix version) return the return code of the java program. So a successful build returns 0, failed builds return other values.
关于unix - 当您的构建在自动化过程中失败时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34955905/