|
|
|
|
Re: man page for plugin classes [message #939317 is a reply to message #939154] |
Wed, 10 October 2012 16:38 |
|
The build prarmeter is not defined as build = new Build, but it is passed in as a value into the perform method. If you look at the method perform it declares an AbstractBuild as build, so we can use the variable build within the perform method.
Project - If you want to get the project you can do build.getProject() which returns the parent project to the current build.
Workspace - To get the workspace for the current build you can do build.getWorkspace() which returns the workspace for the current build. There is another method to get the workspace which is build.getProject().getWorkspace() which is deprecated and should not be used because when building a project concurrently if the workspace changes it will just obtain the last build workspace instead of the build workspace.
Result Launcher - I don't believe you need to invoke this, it should automatically invoke the Result Launcher as long as you leave the perform method. If you would like to get results from the builder and put them in some result set I would advise creating a new class and extending either Recorder or Publisher class.
BuildListener - Build Listener is obtained from the perform method declaration just like AbstractBuild, but the BuildListener is called listener.
/**
* @author Steven Christou
* @dev Hudson-ci
*/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03734 seconds