Builders capacity, job types priority
In documentation offered global
concurrent option and per-builder task
It is good, but not enough.
Say we have build task which run 2-5 minutes and test task which run 16-40 minutes.
Off course build tasks have more priority.
I want propose introduce job
priority. By default all job have both 1. But in
.gitlab-ci.yml we may change it like:
main-build-job: stage: build priority: 1 weight: 1 script: - ./gradlew pushImage --stacktrace --no-daemon --info test-job: stage: test priority: 2 weight: 3 script: - ./gradlew check
[[runners]] name = "bigger runner, 16 CPU cores" capacity = 16 [runners.docker] … [[runners]] name = "smaller runner, 8 CPU cores" capacity = 8 …
Runner should honor such values to run slots. So, when take new job for run it firstly look tasks with minimal priority waiting builder and take it.
Runner will pick jobs until it fits to their capacity.
F.e. big runner may take concurrently 16 tasks of type
main-build-job, or just 5 tasks of type
It will be a super cool if such weights may be set from web interface too.
In that configuration even
concurrent may be calculated dynamically.