In our org initially we only had repository level pipeline runners
As the number of projects grew we found most of the runners can be streamlined to a few rather managing multiple individual runners, otherwise costing CPU, Memory and Maintenance.
We decided to create workspace level runner that can be shared across multiple repos
We don't know how to choose/define which workspace runner to use within individual repository.
Any examples/help/references will be greatly appreciated
Note: We use self.hosted windows pipelines
Hello @sreeram_anikodemahadevan and thank you for reaching out to the Community!
When a pipeline build is triggered, it will be assigned to the first available runner that matches all the labels you have configured in the pipeline step.
So if you want to divide your runner(s) into groups, you can assign different labels to each set of runners, and then on each repository configure the pipeline steps to use the desired runner/group of runners.
Runner labels can be assigned during the runner creation, and for already created runners you can edit the label by accessing the runner's settings. For workspace runners, you can edit the labels as below:
In the example above we are assigning the label group1 to one of the runners. Suppose we have another runner assigned with the group2 label. You can define in each repository's pipelines YML file which step will run in which runner/group of runners as the following example :
pipelines:
default:
- step:
name: Step 1
runs-on:
- 'windows'
- 'self.hosted'
- 'group1'
script:
- echo "This step will run on a runner of group1";
- step:
name: Step 2
runs-on:
- 'windows'
- 'self.hosted'
- 'group2'
script:
- echo "This step will run on a runner of group2";
where step 1 will be executed in any runner of group1, while step 2 will be assigned to a runner in group2.
Hope that helps to clarify your questions! Should you have any follow-up questions, let me know :)
Thank you, @sreeram_anikodemahadevan !
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.