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

Bamboo + TriggeredBuildStrategy + maven-release-plugin = infinite build loop

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 4.0
    • 2.5.1
    • Triggers

      I have a repository with a post-commit hook to trigger a release build on Bamboo 2.5.1. The release build is set to a Trigger Build Strategy, and uses a Maven2 builder to run the following:

      mvn -B release:prepare release:perform

      This will cause Bamboo to checkout from the repository, build, tag the release, and then commit the next development snapshot to the repository. Once the build has finished, Bamboo starts in on another build, and will continue in this "build, commit, build, commit" loop until manually canceled.

      I thought at first this was the post-commit hook's fault, so I removed it, but left the build strategy as Trigger Build Strategy. I then manually triggered the release build from within Bamboo. Same result... an infinite build loop.

      Taking a look at the code, it seems like DetectChangesAfterBuildCompletedListener is the culprit, because it explicitly fires a ChangeDetectionRequiredEvent if the build strategy is TriggeredBuildStrategy. There's probably a good reason for this, but for me, it's a blocker on integrating Bamboo any further into our build process.

      I verified this to be the case for both Git and Subversion repositories.

            [BAM-5758] Bamboo + TriggeredBuildStrategy + maven-release-plugin = infinite build loop

            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 1436814 ] New: JAC Bug Workflow v3 [ 3384074 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Owen made changes -
            Workflow Original: Bamboo Workflow 2016 v1 [ 1418966 ] New: Bamboo Workflow 2016 v1 - Restricted [ 1436814 ]
            Marek Went (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2014 v2 [ 608830 ] New: Bamboo Workflow 2016 v1 [ 1418966 ]
            Marcin Gardias made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]

            I believe this specific case (maven release) is fixed now, as Bamboo ignores those commits.

            Marcin Gardias added a comment - I believe this specific case (maven release) is fixed now, as Bamboo ignores those commits.
            Marcin Gardias made changes -
            Fix Version/s New: 4.0 [ 21512 ]
            Marcin Gardias made changes -
            Link New: This issue is related to BAM-10693 [ BAM-10693 ]
            James Dumay made changes -
            Workflow Original: Bamboo Workflow 2014 [ 598736 ] New: Bamboo Workflow 2014 v2 [ 608830 ]
            James Dumay made changes -
            Workflow Original: Bamboo Workflow 2010 [ 210218 ] New: Bamboo Workflow 2014 [ 598736 ]

            One thought for a fix/workaround - would it be possible to allow builds with a Manual build strategy to be triggered externally? In testing, Manual locks everything down at present.

            Aaron Crickenberger added a comment - One thought for a fix/workaround - would it be possible to allow builds with a Manual build strategy to be triggered externally? In testing, Manual locks everything down at present.

              Unassigned Unassigned
              85eb7cc6ec6f Aaron Crickenberger
              Affected customers:
              2 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: