I.e. you have it right in front of you :) public void setUp(Context context, Run<?, ?> run,* FilePath workspace*, Launcher launcher, TaskListener listener, EnvVars initialEnvironment)
On Fri, Aug 28, 2015 at 10:05 AM, Daniel Beck <[email protected]> wrote: > > On 28.08.2015, at 06:20, Vinodhini Vijay <[email protected]> > wrote: > > > 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) > > The point of SimpleBuildWrapper and similar other interfaces is that it > tells you e.g. the relevant workspace as a parameter. This way your > Workflow job/run can have any number of workspaces in parallel. > > --- > > On 28.08.2015, at 08:37, Mads Nielsen <[email protected]> wrote: > > > You can get the Workspace from the run object by doing > run.getExecutor().getCurrentWorkspace(). > > From Javadoc of Executor#getCurrentWorkspace(): > > > If current executable is AbstractBuild, return the workspace that this > executor is using, or null if the build hasn't gotten to that point yet. > > So that won't work for Workflow, which isn't based on AbstractBuild. > > -- > 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 [email protected]. > 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. > -- Robert Sandell *Software Engineer* *CloudBees Inc.* -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CALzHZS1MTHiZdOeXQuG6jxtrP5c6eH2C0f8Se0dzo791iVwPTQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
