Last updated Dec 8, 2017

Bamboo API Changes for Bamboo 2.6

Developing for Bamboo 2.6

If you are a Bamboo plugin developer, this page outlines changes in Bamboo 2.6 that may affect Bamboo plugins compiled for Bamboo version 2.5.x or earlier.

The ConfigurablePlugin Interface (and BaseConfigurablePlugin)

The ConfigurablePlugin interface is used by any plugins which take in configuration information via the plan wizard. The BaseConfigurablePlugin is an Abstract class which helps to implement the methods of the ConfigurablePlugin interface.

The following interface methods have been changed in the ConfigurablePlugin

1
2
String getViewHtml(@NotNull Build build);
is now
String getViewHtml(@NotNull Plan plan);
1
2
String getEditHtml(@NotNull BuildConfiguration buildConfiguration, @NotNull Build build);
is now
String getEditHtml(@NotNull BuildConfiguration buildConfiguration, @NotNull Plan Plan);

And on the abstract class (you might have overridden these methods)

1
2
protected void populateContextForView(@NotNull Map<String, Object> context, @NotNull Build build)
is now
protected void populateContextForView(@NotNull Map<String, Object> context, @NotNull Plan plan)
1
2
protected void populateContextForEdit(@NotNull Map<String, Object> context, @NotNull BuildConfiguration buildConfiguration, @NotNull Build Build)
is now
protected void populateContextForEdit(@NotNull Map<String, Object> context, @NotNull BuildConfiguration buildConfiguration, @NotNull Plan plan)

The implications

A Build is a subclass of a Plan so you will just need to update the method signatures of your implementing/overriding classes. All usages of these methods should be able to remain the same.

com.atlassian.bamboo.results.BuildResults has been deprecated

The com.atlassian.bamboo.results.BuildResults class has been deprecated and will be removed in Bamboo 3.0. Instead, please use the BuildResultSummary class where possible. This is particularly important for freemarker templates, where the build results objects are no longer available for builds that have never been built.

Notification Dispatcher

The notificationDispatcher has moved modules. The implications of this is that if your plugin uses the notificationDispatcher, you might need to recompile/rebuild your plugin. No code changes should be required. However, if your plugin has a maven dependency on atlassian-bamboo-core purely so you can use the notificationDispatcher, you should be able to remove this dependency, which could speed up your builds slightly.

Some methods in com.atlassian.bamboo.event.BuildCompletedEvent have been removed

The getBuildResults(), getBuild() and getBuildResultSummary() methods of com.atlassian.bamboo.event.BuildCompletedEvent have been removed but can be queried by using the BuildManager and BuildResultsSummaryManager.

TestResultError

The com.atlassian.bamboo.results.tests.TestResultError class has been removed. Test result errors now implement the TestCaseResultError interface (method names inside have changed too).

Please use the com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorImpl class in place of TestResultError.

ProjectManager/BuildManager split

Methods related to the management of projects (e.g. getAllProjects) are no longer available in the BuildManager interface. Instead, please use ProjectManager to access them.

Build/Plan split

Some of the methods that used to return objects implementing Build interface now return Plan interface.

BuildExecutionManager.BuildDetectionAction interface

Interface BuildDetectionAction is now standalone (extracted out of BuildExecutionManager).

Rest changes

Content returned from /rest/api/latest/build/XXX-XX-X?expand=testResults.failed.testResult may have changed slightly in Bamboo 2.6, particularly the format of the output in the duration fields.

Calls to api/rest/getBuildResultsDetails.action will no longer return any test results. Please use the above url instead.

System property DISABLE_SUCCESSFUL_TEST_INDEX

Bamboo no longer indexes test results. Hence, this system property has been removed.

Rate this page: