I am currently porting a build job from Jenkins to Azure Devops. The Jenkinsfile is roughly structured as:
def buildConfig(config) {
build(config)
runUnitTests(config)
runOtherTests(config)
...
}
doExpensiveSharedSetup()
buildConfig("config1")
buildConfig("config2")
buildConfig("config3")
...
buildConfig("configN")
doExpensiveCleanup()
I would like to run all this in a single Azure pipeline, because I don't want to repeat the setup/cleanup code on multiple agents (as I think would happen if I triggered a pipeline once for each config). What is the typical approach for grouping multiple tasks into a unit that can be repeated with different input variables?