There is a nice feature in Teamcity called detached builds. Can’t post url to the docs, looks like Gitlab restriction.
It allows to free the runner in the end of the job, for example, to wait for deployment becoming healthy. The runner takes next job and the current one is being processed by the server. Our external service sends messages to the job log watching the deployment and after timeout finishes the job.
Does Gitlab have anything similar? It can decrease the time that jobs are waiting for a free runner.
Parent-child pipelines can be detached, and might help your use case. Downstream pipelines | GitLab
Sorry, but found nothing about releasing runners for other jobs. As I can see downstream pipelines use runners in same way as parent ones.
Sorry, missed that detail. Downstream pipeline jobs can use tags, and then different runners can take over the jobs with these tags. This is a common technique for creating runner “pools” too, where resources can be shared, or limited to.
I see that my explanation is not clear enough) Could you plz read the documentation about this feature? It can be googled by “Detaching Build from Agent” request. In our terms it would be detaching job from runner)
There isn’t anything in the Gitlab Runner documentation that hints at such functionality, so I would say it doesn’t exist. You can configure concurrency and limits though, so that Runners can run more than one job at any one time.
See: Plan and operate a fleet of instance or group runners | GitLab
That may or may not fit your needs, it’s an alternative to what you are looking for, that is all. You could however raise an issue here asking for Gitlab to develop such feature: Issues · GitLab.org / gitlab-runner · GitLab you could even link there the info about the Teamcity functionality so that the Gitlab devs could take a look and potentially replicate/offer a similar function.
It’s a pity, but sounds like a solution) Thank you very much for dotting the i’s!
1 Like
I have read Detaching Build from Agent | TeamCity On-Premises Documentation but I do not fully understand it. It seams that TeamCity has different architecture concepts where a runner
and agent
are two different things.
I’d still suggest looking into parent-child pipelines and runner tags to model a similar, async detach pipeline that is executed on 2 different runners.
1 Like