【问题标题】:Codeship Pro on_fail accross stepCodeship Pro on_fail 跨步
【发布时间】:2023-03-06 06:00:05
【问题描述】:

当前一个步骤失败时,该步骤的on_fail 指令是否运行?

我正在使用这些步骤:

- name: fail intentionally
  service: busybox
  command: false
- name: check if onfail is called
  service: busybox
  command: true
  on_fail:
    - command: echo reporting failure

调用jet steps 会产生以下输出:

(step: fail intentionally) 
(image: busybox) (service: busybox) Image exists, using cached image
(step: fail intentionally) error ✗
(step: fail intentionally) container exited with a 1 code

我的on_fail 没有运行。

这是 jet 实用程序的问题,还是 Codeship 中的行为相同?

【问题讨论】:

    标签: codeship


    【解决方案1】:

    您已为第二个测试步骤(不会失败的步骤)定义了on_fail 意外事件。如果为第一步设置了on_fail(这将失败并停止构建),您会注意到回显语句。

    此行为与在 CodeShip Pro 中运行的构建一致。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-06
      • 2010-11-29
      • 1970-01-01
      • 2014-04-08
      • 1970-01-01
      相关资源
      最近更新 更多