diff options
Diffstat (limited to 'Resource groups for mutual exclusive running of jobs.md')
-rw-r--r-- | Resource groups for mutual exclusive running of jobs.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Resource groups for mutual exclusive running of jobs.md b/Resource groups for mutual exclusive running of jobs.md new file mode 100644 index 0000000..d56edbf --- /dev/null +++ b/Resource groups for mutual exclusive running of jobs.md @@ -0,0 +1,23 @@ +[[Gitlab Docs - Resource Group]] + +--- + +It is possible for jobs to be run in serial over different pipelines by adding them to a `resource_group`. Jobs in the same `resource_group` will wait on other jobs in that group to be finished before starting. + +Keyword: `resource_group`. + +For example this was useful when building a pipeline that spins up a VM to run devstack and install the backup service. To prevent more recent pipelines from interfering with prior pipelines that are still running I've put jobs that need to wait in the `resource_group: devstack`. + +### Process modes +- unordered +- oldest_first +- newest_first +- newest_ready_first + +Sadly these can't be easily set in the YAML definition but have to be configured for a specific resource group via the API. + +``` +curl --request PUT --data "process_mode=oldest_first" \ + --header "PRIVATE-TOKEN: glpat-GpPmmkY5LYuHscpvZPJ8" "https://gitlab.group.one/api/v4/projects/6675/resource_groups/devstack" +{"id":102,"key":"devstack","process_mode":"oldest_first","created_at":"2025-05-27T13:10:00.691Z","updated_at":"2025-06-10T15:06:48.569Z"} +```
\ No newline at end of file |