Server plugin to automatically pin a build

Hi,

I am creating a plugin that would automatically pin a build based on specific VCS comment. I've extended ServerListener and overridden the BuildFinished method. How can I access SFinishedBuild.setPinned from here?

The openapi doc has this:

buildFinished

void buildFinished(http://javadoc.jetbrains.net/teamcity/openapi/current/jetbrains/buildServer/serverSide/SRunningBuild.html build)
Called after build finishing, only if build was not interrupted
Parameters:build - running build  // TODO: shall pass SFinishedBuild as parameter
Is there a workaround until the parameter is changed?

Thanks,
Balaji

1 comment
Comment actions Permalink

Until todo is fixed you can try to retrieve the finished build from the build hiostory:
buildHistory.findEntry(build.getBuildId())
where buildHistory is a BuildHistory bean retrieved from Spring.

0

Please sign in to leave a comment.