This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

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.

  • No labels