Last updated Dec 8, 2017

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

1
2
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

1
2
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.

Rate this page: