我在 Ubuntu 上安装了全新的 Jenkins
- 新工作 -> 构建多配置项目
向下滚动并单击“添加构建步骤”-> 执行 shell 并输入:
echo hello
运行作业(成功)
查看运行的控制台输出:
Started by user My Name Building in workspace /var/lib/jenkins/jobs/my_job/workspace Triggering default default completed with result SUCCESS Finished: SUCCESS
再次执行这些步骤,但使用 Execute shell:
echo hello
thisshouldfail
你得到...
Started by user My Name
Building in workspace /var/lib/jenkins/jobs/my_job/workspace
Triggering default
default completed with result FAILURE
Finished: FAILURE
请注意,您在输出中看不到“hello”。这适用于我可能放入该 Execute Shell 的任何内容。有什么帮助吗?