First build of branches has wrong number in updated Bamboo

Issue #2 new
Roger Strain created an issue

After updating to a new version of Bamboo, it appears this plugin is not working properly on the first build only of a new branch. We have new branches created automatically when a pull request is opened, and the first build of each new branch has a build number of #1. Subsequent builds begin using the managed build number as desired.

Actual plugin build number is 6.4.1, which is not available in the version list below.

Atlassian Bamboo version 6.7.1 build 60705 - 18 Oct 18

Comments (7)

  1. Roger Strain reporter

    Had a developer mention to me that we are still seeing this sporadically. I've tried to find any logs related to what this plugin is doing, but haven't found anything. Is there anything I can look for to help troubleshoot this? We moved from a rather hacky workaround to this, since the plugin seemed cleaner, but if we can't get reliable results, I may have to put the hack approach back.

  2. Megan

    Any update on this? I’m on the trial license version 6.5.1. We also see this happening, which is a blocking issue. We have to resort to a hacky workaround as well.

  3. Олег Ефимов repo owner

    It isn’t possible to change this behaviour at the moment due to the capabilities Bamboo gives to the plugins – plugin gets notified of the branch creation after / in parallel with the initial run.

    Possible workaround is to set “Branch triggers” for the plan to “None” and then change trigger for each branch after creation – a tedious one, though.

  4. Roger Strain reporter

    That’s unfortunate. The workaround also won’t work, because we’re using automatic branch creation as pull requests are generated. There’s no feasible way to expect a developer to change the trigger settings appropriately.

    Knowing the problem, would it be reasonable to add a flag to this plugin to accomplish much the same thing? Something maybe called “Initial Build Workaround”, with documentation and behavior along the lines of:

    To avoid issues with the first build of an automatically created branch, set the build trigger for such branches to “None. Run new plan branches manually”. When this setting is enabled, if a new branch is detected, its build number will be updated appropriately, its build trigger will be changed to “Same as defined in parent plan”, and a new build will be immediately started.

    Honestly, I’m not completely convinced of this one just yet myself, but I’m trying to think of some way to make this work. The plugin gets us so very close to the behavior we want to have, but this issue is a constant source of annoyance to us, and makes it impossible to distinguish deployments from an initial build off a feature/bugfix branch.

  5. Megan

    We really need this capability. The only way we’ve gotten it to work is to use the plugin, and to have each build start with a conditional task. The conditional task says if the build number is 1, queue another build and stop the current build. The first build doesn’t complete, but the second picks up the synchronized version number.

  6. Log in to comment