Jenkins-Parameterized Build Sub-flow
Our CI Server has a set of jobs as below:
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