Who trigger the pipeline job, gitlab server or gitlab-runner?

@hchouraria @gitlab-team @gitlab-team @gitlabteam @gitlab

we are using .gitlab-ci.yml file in our projects. We want to use API to trigger pipelines. But before that we want to properly understand which component actually triggers the pipeline.
Is it gitlab ci server who triggers the pipeline & that triggering depends on .gitlab-ci.yml file OR the runner keep an eye on the project repo and whenever there is a change the Runner automatically triggers the pipeline & pulls the .gitlab-ci.yml file ?

Please provide some insights.

Thank you

as I understand it, the gitlab server is watching the repository. If it receives a trigger (git push, pipeline UI, etc.) it creates a pipeline.
Then a runner checks periodically if gitlab has new jobs for it.

If you have a pipeline which requires a runner with a specific tag, but the runner is not registered yet, you can see that the pipeline and jobs are createt, but gitlab UI says “pending, no runner found for tag” or sth like that.

You can configure a pull interval, how often a runner checks for new jobs on gitlab.
Otherwise it would not work with muliple runners.

So in conclusion I would say: gitlab watches the repo and triggers the pipeline, the runner is fetching available jobs from gitlab and executes them.