Last updated Dec 8, 2017

API changes for Bamboo 5.10 EAP

This page describes the API changes for the Bamboo 5.10 EAP release.

Overview

This page is intended to be read by Bamboo plugin developers to inform them of changes in Bamboo 5.10 EAP release that could affect their plugins.

Summary of changes

com.atlassian.bamboo.plan.Plan

The following methods were removed without replacement as plugins shouldn't modify the values:

1
2
void setFirstBuildNumber(int firstBuildNumber);

void setLastBuildNumber(int lastBuildNumber);

void setNextBuildNumber(int nextBuildNumber);

com.atlassian.bamboo.plan.ImmutablePlan

Accessing next build number has been deprecated.

1
2
/**
 * The next build number represents the number of the next build result that's to be executed
 * @return a build number, starting with 1
 * @deprecated 5.10 this is a piece of internal data and should not be used
 */
@Deprecated
int getNextBuildNumber();

com.atlassian.bamboo.deployments.execution.DeploymentContext

Return type change. The method incorrectly returned Map<String, Artifact> instead of Multimap<String,Artifact>

1
2
@NotNull
Multimap<String, Artifact> getVersionArtifacts();

com.atlassian.bamboo.build.artifact.ArtifactHandler

This method has been removed.

1
2
/**
 * Retrieve plan artifact. Artifact is found by label (taken from artifactSubscription) and planResultKey.
 * @param planResultKey identifier of source plan
 * @param clientKey identifier of plan or deployment doing the download
 * @param artifactSubscription download details (e.g. target path, copy pattern)
 * @param artifactRetrievalConfig handler specific configuration
 */
@NotNull
ArtifactRetrievalStatus retrieve(@NotNull final PlanResultKey planResultKey,
                                 @NotNull final ResultKey clientKey,
                                 @NotNull final ArtifactSubscriptionContext artifactSubscription,
                                 @NotNull final ArtifactRetrievalConfig artifactRetrievalConfig) throws Exception;

com.atlassian.bamboo.build.artifact.ArtifactManager

Method signature changes.

1
2
/**
 * Retrieves a plan artifact from artifact storage.
 *
 * @param buildLogger           to use
 * @param planResultKey         the plan result that contains the artifact
 * @param artifactSubscription  the artifact subscription used to identify artifact
 * @param buildWorkingDirectory working directory of current build
 * @param availableArtifacts    artifacts found in source result
 * @return true if retrieval was successful, false otherwise
 */
boolean retrieve(@Nullable final BuildLogger buildLogger,
                 @NotNull final PlanResultKey planResultKey,
                 @NotNull final ArtifactSubscriptionContext artifactSubscription,
                 @NotNull final Map<String, String> artifactHandlerConfiguration,
                 @NotNull final File buildWorkingDirectory,
                 @NotNull final Multimap<String, Artifact> availableArtifacts);

/**
 * Retrieves an artifact from artifact storage. The important difference for that method is, that NO subscription
 * information is updated. Useful for retrieving artifacts in non standard way (cross-plan for example)
 *
 * If versionArtifacts parameter is specified, the method will first try to match requested artifact with the content of the map.
 * If match is found, information in {@link Artifact} object will be used to find artifact in the storage.
 *
 * @param buildLogger
 * @param planResultKey
 * @param clientKey
 * @param artifactDefinitionContext
 * @param destinationPath
 * @param artifactHandlersConfiguration
 * @param buildWorkingDirectory
 * @param availableArtifacts
 *
 * @return
 */
boolean retrieve(@Nullable BuildLogger buildLogger,
                 @NotNull PlanResultKey planResultKey,
                 @NotNull ResultKey clientKey,
                 @NotNull ArtifactDefinitionContext artifactDefinitionContext,
                 @NotNull String destinationPath,
                 @NotNull Map<String, String> artifactHandlersConfiguration,
                 @NotNull File buildWorkingDirectory,
                 @NotNull final Multimap<String, Artifact> availableArtifacts);   

com.atlassian.bamboo.task.CommonTaskContext

This method has been added. It returns runtime data that complements static task configuration.

1
2
@Nullable
Map<String, Serializable> getRuntimeTaskData();

Rate this page: