[Backend] Add a setting option for self-hosted instances to limit jobs in a pipeline

🧩 Problem Statement

In the issue #329926 (closed) a limit is being applied for .com on the allowed number of jobs in a pipeline for it to get created successfully. Self-hosted instances should have a freedom to set the limit by themselves.

💬 Background

#329926 (comment 584043536)

Design proposal

Add a setting option for self hosted to enforce and set a limit for the number of jobs in a pipeline.

Backend Technical Proposal

Add a new column to project_ci_cd_settings. This should be an integer column, maybe the with the name builds_per_pipeline_limit.

Add the ability to get and update the field via the graphql API.

Add the ability to get and update the field via the REST API.

Update the application to check the default limit or the new field.

Edited by 🤖 GitLab Bot 🤖