Updates to the build processing plugins

The various pre and post build plugin points have been updated to to reflect the new build agent task structure.

  • com.atlassian.bamboo.build.CustomPreBuildAction
  • com.atlassian.bamboo.build.CustomBuildProcessor
  • com.atlassian.bamboo.build.CustomBuildProcessorServer

Essentially the method:

public void run(Build build, BuildResults buildResult);

has been replaced with the BuildTask interface.

 * Interface the defines a basic interface for a task in Bamboo. All {@link #call()} methods return {@link BuildContext}
 * objects.
public interface BuildTask extends Callable<BuildContext>
    void init(@NotNull BuildContext buildContext);

     * <p>Execute the build task.</p>
     * <p>Implementations should regularly check if the calling {@link Thread} has been interrupted.</p>
     * @return
     * @throws InterruptedException if the calling {@link Thread} has been interrupted.
     * @throws Exception A general exception that will be handled.
    BuildContext call() throws InterruptedException, Exception;

You should be able to access most of the things you need through the BuildContext that can be retained from the init method.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport