Reputation: 501
I am using Jenkins 'multi job plugin' for ruuning build in jenkins
Currently i have two builds named 'Build_1' and 'Build_2'. These two job combined in two multi job build named 'Parent1' and 'Parent2'.
As shown below
Parent1
--- build_x
---build_y
Parent2
-- build_x
-- build_y
I want to provide different workspace for 'build_x' and 'build_y' when i run through 'Parent1' and 'parent2' build.
The option provided in Jenkins “Use custom workspace" is always fixed for one build but i need to change this location depending upon the trigger from 'parent1' build or 'parent2' build. Is there any option so that on trigger of 'parent1' i set environment variable for workspace location ,so that i can provide different workspace.
Upvotes: 0
Views: 2729
Reputation: 2481
If you are triggering the build_x and build_y jobs from the parent, then you can pass in the workspace path via a build parameter.
For example:
When you kick off the parent, it should create a workspace under the C drive called ParentA or ParentB.
Upvotes: 1