1

我有 3 个竹子阶段:测试、分期和生产。所有这些都提取源代码、编译和运行测试。在以前的 Bamboo 版本中,如果一个失败(测试失败 fe 之一)它会继续下一阶段。在最新版本中,它不会进入下一阶段并停止构建。即使一个阶段失败,我如何才能覆盖此行为以继续构建?

输出:

simple  17-Sep-2013 17:56:12    Failing task since return code of [c:\dev\maven3\bin\mvn.bat --batch-mode -Djava.io.tmpdir=C:\Program Files\Bamboo\temp\CS-AND-JOB1 clean install -P envbuild -DbuildNumber=4] was 1 while expected 0
simple  17-Sep-2013 17:56:12    Parsing test results...
simple  17-Sep-2013 17:56:12    Finished task 'Maven 3.x'
simple  17-Sep-2013 17:56:12    Running post build plugin 'NCover Results Collector'
simple  17-Sep-2013 17:56:12    Running post build plugin 'Clover Results Collector'
simple  17-Sep-2013 17:56:12    Running post build plugin 'Artifact Copier'
simple  17-Sep-2013 17:56:12    Finalising the build...
simple  17-Sep-2013 17:56:12    Stopping timer.
simple  17-Sep-2013 17:56:12    Build CS-AND-JOB1-4 completed.
4

2 回答 2

5

简而言之,您不能覆盖此行为,这就是 Bamboo(和其他构建工具)的设计方式。

你应该做的是:

  1. 构建一次并将输出保存为可供后续阶段使用的工件
  2. 通过从第一阶段检索工件来测试您的构建输出
  3. 部署到 X 环境

如果上述任何步骤都失败了,则不应将其部署到环境中,失败阶段的要点是表明某些事情不正确,您应该修复损坏的测试或排除它们。

于 2013-09-26T10:04:04.007 回答
1

我已经联系了 atlassian 支持,他们确认这是一个错误 - 阶段应该是独立的。他们正在调查这个问题。

于 2013-09-26T12:38:30.857 回答