unix - 当您的构建在自动化过程中失败时

标签 unix ssh ant build automation

我有一个脚本,一旦运行它便在多台服务器中进行“构建”。我现在试图弄清楚如何知道构建是否失败。例如,脚本将运行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/

相关文章:

linux - 如何以 unix 精神编码? (小型单任务工具)

c# - 使用 SSH.NET 将文件从 Windows 移动到 UNIX 服务器时修改的日期时间发生变化

bash - 服务器在尝试scp时给我一个权限错误,但在ssh时却没有

java - 用于加密的自定义 Maven 插件

linux - 重命名以数值结尾的文本文件

bash - 如何在 Bash 中逐行合并两个文件

git - OpenShift Jenkins git clone 失败 : Host key verification failed

ssh - 使用Ansible SSH到远程服务器

ant - 将 ant 从 1.7 迁移到 1.8.2 问题

java - Ant : moving a file into a target directory