Repository plugin changes in 2.0

The Repository plugin has changed significantly in Bamboo 2.0. Previously, the getChangesSinceLastBuild method was responsible for detecting the changes and updating the respository to the latest code. This has been broken into two separate methods now, as described below:

1. collectChangesSinceLastBuild method

BuildChanges collectChangesSinceLastBuild(@NotNull String planKey, @NotNull String lastVcsRevisionKey) throws RepositoryException;

The collectChangesSinceLastBuild method returns a BuildChanges object that encapsulates the commits and changes between the last build and the current source repository (through the vcsRevisionKey).

2. retrieveSourceCode method

String retrieveSourceCode(@NotNull String planKey, @Nullable String vcsRevisionKey) throws RepositoryException;

The retrieveSourceCode updates the code to the vcsRevisionKey as returned from the previous method. If the vcsRevisionKey is null, then the method should check out to latest. The return value is what the source code was actually updated to.

Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport