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

  1. $(ENV,var="SubBuild") getting parameter value to compare
  2. 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
When you pressing build button which will show the options let you choose what flow you want to build.

Popular posts from this blog

Stopping TypeScript Compile to accelerate debugging

RAM Disk 2017 My memo