Bamboo plan branch build fails with an error "Failed to execute plugin 'Maven Branch Version Revert' with error: Builder label is not defined"
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Bamboo plan branch builds throw Failed to execute plugin error while trying to run the plan branch build. The master branch build is successful but it fails for the plan branches.
Failed to execute plugin 'Maven Branch Version Revert' with error: Builder label is not defined
Environment
Issue is seen on Bamboo 8.2.6 but this might be applicable for any other supported version.
Diagnosis
The Failed to execute plugin error is seen in the <bamboo-home>logs>atlassian-bamboo.log . While checking further in the remote agent logs <bamboo-agent-home>/logs/atlassian-bamboo.log we can see the following error:
2022-12-16 07:40:30,587 INFO [2-BAM::ba-cloud-las-0.gdp.bamboo-agent-cloud-dev.svc.cluster.local (2)::Agent:pool-5-thread-1] [ExecuteBuildTask] Running post build plugin 'Maven Branch Version Revert'
2022-12-16 07:40:30,600 WARN [2-BAM::ba-cloud-las-0.gdp.bamboo-agent-cloud-dev.svc.cluster.local (2)::Agent:pool-5-thread-1] [ExecuteBuildTask] Failed to execute plugin with class com.adp.ds.atlassian.bamboo.maven.MavenBranchVersionPostBuild : RE-WG2-BSP-1
java.lang.NullPointerException: Builder label is not defined
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:907)
at com.adp.ds.atlassian.bamboo.branch.task.AbstractMavenConfig.<init>(AbstractMavenConfig.java:46)
at com.adp.ds.atlassian.bamboo.branch.task.Maven3Config.<init>(Maven3Config.java:21)
at com.adp.ds.atlassian.bamboo.maven.MavenBranchVersionConfiguration.<init>(MavenBranchVersionConfiguration.java:25)
at com.adp.ds.atlassian.bamboo.maven.MavenBranchVersionPostBuild.call(MavenBranchVersionPostBuild.java:50)
at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.performCustomBuildProcess(ExecuteBuildTask.java:139)
2022-12-16 07:32:21,531 INFO [ThreadPoolAsyncTaskExecutor::Thread 19] [ExtenderConfiguration] Application context successfully refreshed (NonValidatingOsgiBundleXmlApplicationContext(bundle=com.edwardawebb.bamboo-agent-apis, config=osgibundle:/META-INF/spring/*.xml))
2022-12-16 07:32:21,533 ERROR [AgentRunnerThread] [PluginEnabler] Unable to enable plugin com.hindsighttesting.behave.cucumber-bamboo-plugin
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.hindsighttesting.behave.cucumber-bamboo-plugin
at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:424)
at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:260)
at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:120)
at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:97)
at com.atlassian.plugin.manager.DefaultPluginManager.lambda$enableDependentPlugins$24(
Cause
The issue seems to be isolated to the below two user-installed plugins :-
<plugin>
<key>com.hindsighttesting.behave.cucumber-bamboo-plugin</key>
<name>BDD Insights</name>
<version>2.1.2</version>
<vendor>Hindsight Software Ltd</vendor>
<status>ENABLING</status>
<vendor-url>http://www.hindsightsoftware.com/</vendor-url>
<framework-version>2</framework-version>
<bundled>User installed</bundled>
</plugin>
<plugin>
<key>com.adp.ds.atlassian.bamboo.bamboo-branch-version-plugin</key>
<name>Bamboo Branch Version Plugin</name>
<version>1.0-SNAPSHOT</version>
<vendor>ADP</vendor>
<status>ENABLED</status>
<vendor-url>http://www.adp.com/</vendor-url>
<framework-version>2</framework-version>
<bundled>User installed</bundled>
</plugin>
Solution
Try disabling the two user installed plugins and then try re-running the failed build.
Steps for Disabling a plugin
Steps for Disabling a plugin 1. Go to the Plugin Manager in Bamboo: 2. Log in as a user with the 'Admin' global permission. 3. Click Administration in the top navigation bar. 4. Click Plugin Manager, in the left-hand panel, under 'Plugins'. 5. Click the 'Manage Existing' tab. You will see a list of the plugins installed in your application. Enabled plugins will have this icon: 6. Locate the plugin that you want to disable and click the title to expand the plugin details section. 7. Click the 'Disable' button. 8. Once a plugin has been disabled, you may need to restart your application for your change to take effect. If so, you will see a message for the plugin, 'Disabled, requires restart'
Once the plugin is fully disabled, you will see an 'Enable' link for the plugin.