Updates to the build processing plugins

All Versions
Click for all versions
Bamboo 2.1 Documentation

Index

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.
     */
    @NotNull
    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.

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.