Build step 'Execute shell' marked build as failure
时间: 2023-08-25 13:18:28 浏览: 217
it项目失败告警信号
回答: 当在Jenkins构建过程中遇到"Build step 'Execute shell' marked build as failure"报错时,可能有以下几个原因。首先,可能是磁盘空间不足导致报错。你可以确认一下磁盘空间是否足够。其次,你可以在"Execute shell(执行shell)"构建步骤命令中添加"#!/bin/bash"。Jenkins默认情况下采用"/bin/sh -xe"的方式执行脚本,其中"-x"选项会打印每一个命令,"-e"选项会导致脚本在任何命令返回非零值(即命令失败)时立即停止运行。通过添加"#!/bin/bash",指定脚本使用"/bin/bash"来解释执行。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Jenkins Build step 'Execute shell' marked build as failure](https://blog.csdn.net/zcxbd/article/details/98850758)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [Build step ‘Execute shell’ marked build as failure](https://blog.csdn.net/u014651417/article/details/125047331)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文