Add time based runner priority
Description
In a lot of cases runner priority feature would be great, but as discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/12715 it is very difficult to implement now.
In my case I have two runner types:
- Local runners on my own servers - that are very cheap
- Autoscaling runners in GCE - that are much expensive, but could run very huge amount of jobs.
So I would like to run jobs on my local runners when they are free.
For my opinion this problem could be solved by two ways:
- Planning jobs in gitlab - what have discussed in https://gitlab.com/gitlab-org/gitlab-ce/issues/12715. But for my opinion this feature wont be implemented in near future cause it requires big changes.
- Add to gitlab-runner config option that will restrict runner to start jobs that are newer then something.
Include problem, use cases, benefits, and/or goals
Proposal
So my proposal is to add to gitlab-runner config option that will restrict runner to start jobs newer than specified in config.
So for example i'll set my GCE runners to only run jobs that are older than 2 periods of check_intervals
for my local runners.
So when job will be created my local runners will run it, but if my local runners are busy - GCE runners will run it.
Links to related issues and merge requests / references
Please paste a link of the related issues or/and merge requests