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

Repository commit trigger will always trigger main build

    • Icon: Bug Bug
    • Resolution: Answered
    • Icon: Medium Medium
    • None
    • 5.7.1, 5.10-OD-04
    • None
    • None

      Summary

      The 'Remote Trigger' in Bamboo is causing only main plans to be triggered, even though commits are made to branches associated to branch plans within that main plan.

      Example:

      I have the following test project setup:

      Main plan with trigger "Repository triggers the build then changes are commited" and selected repository with branch "develop".

      Branch plan with trigger "Repository triggers the build then changes are commited" and selected repository with branch "master".

      For both repositories selected Bitbucket. (See screenshot for what I mean by that. I will test with Git later).

      Now when I commit changes to master brach main plan gets triggered instead of Master branch plan. I expect Master branch plan to be triggered.

      New commit to develop branch will trigger main branch plan as expected.

      It works well if "Pull the repository for changes" selected.

      Steps to Reproduce

      1. Create a repository in BitBucket (and possibly other repositories) with the main and another branch, say test branch.
      2. Create a plan in Bamboo associated with the main branch and a branch plan within it associated with the 'test' branch
      3. Add repository to the plan
      4. Create a 'Remote Trigger' in Bamboo to the repository and a service in Bitbucket, as described here, so BitBucket triggers the build immediately after commit
      5. Commit to the 'test' branch

      Expected Results

      1. A build in the branch plan is triggered, as this is the one associated with the 'test' branch

      Actual Results

      1. The main branch is triggered

      Workaround

      1. Use repository polling instead

            [BAM-15923] Repository commit trigger will always trigger main build

            Jeremy Owen made changes -
            Remote Link Original: This issue links to "BDEV-9209 (Atlassian JIRA Extranet - Special Projects)" [ 105492 ] New: This issue links to "BDEV-9209 (Hello Jira)" [ 105492 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2016 v1 - Restricted [ 1436455 ] New: JAC Bug Workflow v3 [ 3380239 ]
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Deric Lee (Inactive) made changes -
            Link New: This issue is related to BAM-17913 [ BAM-17913 ]
            Owen made changes -
            Workflow Original: Bamboo Workflow 2016 v1 [ 1417667 ] New: Bamboo Workflow 2016 v1 - Restricted [ 1436455 ]
            Marek Went (Inactive) made changes -
            Workflow Original: Bamboo Workflow 2014 v2 [ 859907 ] New: Bamboo Workflow 2016 v1 [ 1417667 ]
            Marcin Gardias made changes -
            Resolution New: Answered [ 9 ]
            Status Original: Needs Triage [ 10030 ] New: Resolved [ 5 ]
            Marcin Gardias made changes -
            Status Original: Open [ 1 ] New: Needs Triage [ 10030 ]

            v.prudnikov Did you select "Advanced trigger options" when configuring service in bitbucket? Does it correctly work if you do?
            The difference between this checkbox off and on is the following:

            • off: bitbucket calls queue action, which unconditionally triggers a build according to action's argument. That actions doesn't check if any changes occurred, it simply triggers a build (even if trigger in Bamboo is not configured!)
            • on: bitbucket calls "updateAndBuild" action which only triggers a build if appropriate trigger is configured in Bamboo AND there are changes to be built. That includes checking which branch(es) need to be built.

            Related bitbucket ticket

            I'm looking forward to hearing from you.
            Marcin Gardias
            Bamboo development team

            Marcin Gardias added a comment - v.prudnikov Did you select "Advanced trigger options" when configuring service in bitbucket? Does it correctly work if you do? The difference between this checkbox off and on is the following: off: bitbucket calls queue action, which unconditionally triggers a build according to action's argument. That actions doesn't check if any changes occurred, it simply triggers a build (even if trigger in Bamboo is not configured!) on: bitbucket calls "updateAndBuild" action which only triggers a build if appropriate trigger is configured in Bamboo AND there are changes to be built. That includes checking which branch(es) need to be built. Related bitbucket ticket I'm looking forward to hearing from you. Marcin Gardias Bamboo development team
            Jaime S made changes -
            Comment [ A comment with security level 'atlassian-staff' was removed. ]
            Jaime S made changes -
            Description Original: h3. Summary

            The 'Remote Trigger' in Bamboo is causing only main plans to be triggered, even though commits are made to branches associated to branch plans within that main plan.

            Example:

            I have the following test project setup:

            Main plan with trigger "Repository triggers the build then changes are commited" and selected repository with branch "develop".

            Branch plan with trigger "Repository triggers the build then changes are commited" and selected repository with branch "master".

            For both repositories selected Bitbucket. (See screenshot for what I mean by that. I will test with Git later).

            Now when I commit changes to *master* brach main plan gets triggered instead of Master branch plan. I expect Master branch plan to be triggered.

            New commit to develop branch will trigger main branch plan as expected.

            It works well if "Pull the repository for changes" selected.


            h3. Steps to Reproduce
            # Create a repository in BitBucket (and possibly other repositories) with the main and another branch, say test branch.
            # Create a plan in Bamboo associated with the main branch and a branch plan within it associated with the 'test' branch
            # Link the plan with the repository
            # Create a 'Remote Trigger' in Bamboo to the repository and a service in Bitbucket, as described [here|https://confluence.atlassian.com/display/BAMBOO/Repository+triggers+the+build+when+changes+are+committed], so BitBucket triggers the build immediately after commit
            # Commit to the 'test' branch

            h3. Expected Results
            # A build in the branch plan is triggered, as this is the one associated with the 'test' branch

            h3. Actual Results
            # The main branch is triggered
             

            h3.Workaround
            # Use repository polling instead
            New: h3. Summary

            The 'Remote Trigger' in Bamboo is causing only main plans to be triggered, even though commits are made to branches associated to branch plans within that main plan.

            Example:

            I have the following test project setup:

            Main plan with trigger "Repository triggers the build then changes are commited" and selected repository with branch "develop".

            Branch plan with trigger "Repository triggers the build then changes are commited" and selected repository with branch "master".

            For both repositories selected Bitbucket. (See screenshot for what I mean by that. I will test with Git later).

            Now when I commit changes to *master* brach main plan gets triggered instead of Master branch plan. I expect Master branch plan to be triggered.

            New commit to develop branch will trigger main branch plan as expected.

            It works well if "Pull the repository for changes" selected.


            h3. Steps to Reproduce
            # Create a repository in BitBucket (and possibly other repositories) with the main and another branch, say test branch.
            # Create a plan in Bamboo associated with the main branch and a branch plan within it associated with the 'test' branch
            # Add repository to the plan
            # Create a 'Remote Trigger' in Bamboo to the repository and a service in Bitbucket, as described [here|https://confluence.atlassian.com/display/BAMBOO/Repository+triggers+the+build+when+changes+are+committed], so BitBucket triggers the build immediately after commit
            # Commit to the 'test' branch

            h3. Expected Results
            # A build in the branch plan is triggered, as this is the one associated with the 'test' branch

            h3. Actual Results
            # The main branch is triggered
             

            h3.Workaround
            # Use repository polling instead

              Unassigned Unassigned
              0e1dc84f707b Vladimir Prudnikov
              Affected customers:
              1 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: