--
Hello All,
I would like to get the workspace of the Run object. To make workflow compatible, my custom build wrapper class extends SimpleBuildWrapper.
I had overridden the method :
public void setUp(Context context, Run<?, ?> run, FilePath workspace, Launcher launcher, TaskListener listener, EnvVars initialEnvironment)
throws IOException, InterruptedException
But, how to get the workspace directory location from the Run object? (As I have to read some file within workspace)
I tried to typecast to AbstractBuild, but during build I got ClassCastExceptionjava.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowRun cannot be cast to hudson.model.AbstractBuild
My Workflow code was:
node{
wrap([$class: 'MyCustomBuildWrapper']) {
print ('Hello')
}
}
Also, after workflow build is completed, will the workspace gets deleted? (As, I couldn't find the workspace folder in my Jenkins home (Also couldn't find Workspace Icon/link in Jenkins GUI) after the build completes)
Or will the workspace gets created only after SCM checkout?
Thanks
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/eccdf524-e7a2-4eb2-bba7-839b9a062cc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/DAB9D791-D55D-498C-8BB6-AFD300A15964%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS1MTHiZdOeXQuG6jxtrP5c6eH2C0f8Se0dzo791iVwPTQ%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/da8ae8fa-daf8-4470-9fad-413cfae77f57%40googlegroups.com.