no matter what you do this is not really a good thing to do and does not 
scale (the workspace is tied to the node) - so you will require all the 
jobs to run on the same node (it is a good practice to have a single 
exectutor per node - so you can see where this is heading!).  

If you want to do multiple jobs with the same files then you should look at 
the Clone Workspace SCM Plugin or think about migrating to workflow (which 
may require you to rearchitect bits of your jobs).

On Monday, October 5, 2015 at 12:44:44 PM UTC+1, rginga wrote:
>
> You might find this easier:
>
>  
>
> Build (“job1”, parent_workspace: 
> build.properties["environment"]["WORKSPACE"])
>
>  
>
>  
>
>  
>
> *From:* jenkins...@googlegroups.com <javascript:> [mailto:
> jenkins...@googlegroups.com <javascript:>] *On Behalf Of *GS_L
> *Sent:* Sunday, October 04, 2015 1:47 AM
> *To:* Jenkins Users
> *Subject:* Re: Pass parent workspace in build flow
>
>  
>
> You right I used this to get the parent work space:
>
> workspace = 
> build.properties["environment"]["JENKINS_HOME"]+"/"+build.properties["environment"]["JOB_NAME"]
>
> build("job1", parent_workspace:build.workspace) 
>
>  
>
> But still cannot pass it to the downstream jobs.
>
>
>
> On Thursday, October 1, 2015 at 3:11:06 PM UTC+3, rginga wrote:
>
> I’m not sure “workspace” is a field of “build”. 
>
>  
>
> *From:* jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] *On 
> Behalf Of *GS_L
> *Sent:* Thursday, October 01, 2015 7:53 AM
> *To:* Jenkins Users
> *Subject:* Pass parent workspace in build flow
>
>  
>
> Hi
>
>  
>
> I have a build flow that runs several builds.
>
> I want that all builds workspace will be under the parent workspace.
>
> I pass the parent workspace through DSL:
>
> The parent workspace is 'NightlyBuild'.
>
>  
>
> build("job1", parent_workspace:build.workspace) 
>
> In job1 - I changed the workspace by checking the 'Use custom workspace'
>
> in 'Directory' I entered the $parent_workspace variable
>
> Results:
>
> The job1 workspace set to '/var/lib/jenkins/$parent_workspace/' instead 
> of '/var/lib/jenkins/NightlyBuild'.
>
>  
>
> Thanks
>
>  
>
> -- 
> 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 jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/a1534aaa-604e-4a7d-973d-c084a28c2940%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/a1534aaa-604e-4a7d-973d-c084a28c2940%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> 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 jenkinsci-use...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jenkinsci-users/b982f7e8-ac26-47cf-83c1-caf5ab0bf534%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jenkinsci-users/b982f7e8-ac26-47cf-83c1-caf5ab0bf534%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/dd27c1bd-288c-4945-b92c-9bb491c3da8c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to