Hi,

I have a custom SCM plugin where the checkout method is overridden and the 
variable ${WORKSPACE} can be resolved using the build object

ex :  build.getEnvironment(buildListener).expand("${WORKSPACE}");

but i want the variable to be resolved during polling, in the 
method compareRemoteRevisionWith, since the build object is not injected 
into this method, i cant resolve as done above, using the project object i 
can get a previous build object and resolve as shown below. BUT the problem 
is, the following solution does not work when there are no previous build 
available. 



public PollingResult compareRemoteRevisionWith(Job<?, ?> project,
Launcher launcher, FilePath workspace, TaskListener listener,
SCMRevisionState baseline) {


                  
 project.getLastBuild().getEnvironment(listener).expand("${WORKSPACE}");


}

Any ideas/solutions are welcome...


Thanks & Regards,
Nandish

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9e63ec76-3c97-4767-bf27-5756e469a8b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to