Jenkins-Parameterized Build Sub-flow
Our CI Server has a set of jobs as below:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM5_A4jDyX8AZ666qYgCxFwPfmRW3SNwieIdz5TmqjKAsKl30MZIEYl6VySmgnhWn60Aw2WPouxYyuwKXv-AfSYluoX5rXm0CJy6lLK2p7hu0tOGr-xChZooZjdzP4xcf86Zet_cvFV6A/s320/f4ab129a0550492c31f05ebb140a13ae-739645.png)
In the daily build job, Once "01-Web" being finished then will trigger "02-Database" and "03-WebTest"
Requirement
After "01-Web", we want to control the other two jobs whether to be built.
- 01-Web --> 02-Database -->03-WebTest (default)
- 01-Web --> 02-Database
- 01-Web --> 03-WebTest
- 01-Web
How to
1.Parameterized Build-add parameter "SubBuid"
2.Add build setting - Condional step :Database,Test
- $(ENV,var="SubBuild") getting parameter value to compare
- If the value was being matched that will trigger the other jobs.For this example that matched "Database" and "Test" two jobs.
3.Add build setting - Condional step :Database
4.Add build setting - Condional step :Test
5.Testing build