I would like to create a pipeline that backup databases on different servers (each server is a different country). I am thinking that the Stage/step/job for each country will have to be computed by dynamically referenced Agent.Name which will run on different servers based on the country.
Also other country related variables will have to be defined in a template like ${{parameters.country}}_variables.yml.
Another thing is that the pipeline has to be cron scheduled, so it would have to run iteratively for all countries, which means that It has to fetch the ${{parameters.country}}_variables.yml file, run the backup task with the defined variables on the correct Agent.Name and then do the whole thing again for the next country.
I am kinda lost. Any help would be appreciated
I already tried different approaches but never managed to dynamically call the template ${{parameters.country}}_variables.yml
Also it seems that I cannot manage to run the backup job iteratively for every country
You can set your YAML pipeline like as below.
With this configuration, when running this YAML pipeline, it will automatically generate a copy of the same stage for each value of
parameters.countryList. Each copied stage will use the associated single value.Of course, you also can set the copy on the job-level rather than stage-level based on your actual needs.
This will automatically generate a copy of the same job for each value of
parameters.countryList. All the copied jobs are in the same stage.