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:
collectChangesSinceLastBuild
method1 2BuildChanges 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
).
retrieveSourceCode
method1 2String 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: