Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-15496

Build is successful when Maven fails and tests are quarantined

    XMLWordPrintable

Details

    Description

      Problem

      Build is successful when Maven fails and tests are quarantined. It looks like using the 'Use Maven return code' feature is not working when used with quarantined tests. In the example below, Maven returned an error code but it looks like Bamboo ignored it, maybe mistaking it for a failed test.

      Steps to reproduce

      Make sure that Maven tasks have 'Use Maven return code' checked. Run a build with quarantined tests.

      // this is correct
      simple	23-Jan-2015 14:03:31	Failing task since return code of [/opt/maven-3.2/bin/mvn -Djava.io.tmpdir=/tmp/AMDN-AMDNRELEASE-JOB1 release:perform --batch-mode -DignoreSnapshots=true -Dresume=false] was 1 while expected 0
      simple	23-Jan-2015 14:03:31	Parsing test results under /mnt/bamboo-ebs/bamboo-agent/build-dir/AMDN-AMDNRELEASE-JOB1...
      simple	23-Jan-2015 14:03:31	Injected variable bamboo.mvn.release.releaseVersion=0.6.38 in RESULT scope
      // this is not correct: all tests pass but maven had an error and did not produce any artifact
      simple	23-Jan-2015 14:03:31	Changing Task Result to SUCCESS as all failed tests were quarantined.
      

      Bamboo detects the task is failing (1st line of the exemple above), but doesn't mark the whole build as failed.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              brosa Bruno Rosa
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: