문제

I have 3 bamboo stages: testing, staging and production. All of them extract the sources, compile and run tests. In previous version of Bamboo it continued the next stage if one failed (one of test failed f.e.). In the latest version it does not go to the next stage and stops build. How can i override this behaviour in order to continue build even if one stage failed?

Output:

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.
도움이 되었습니까?

해결책 2

I've contacted atlassian support and they confirm it's a bug - stages should be independent. They are investigating this problem.

다른 팁

In short, you can't override this behaviour, this is how Bamboo (and other build tools) are designed to work.

What you should be doing is:

  1. Build once and save the output as an artifact which can be used by later stages
  2. Test your build output by retrieving the artifact from the first stage
  3. Deploy to X environment

You shouldn't be deploying to an environment if any of the preceding steps have failed, the point of a failing stage is to indicate something is not right, you should either fix broken tests or exclude them.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top