summaryrefslogtreecommitdiff
path: root/Resource groups for mutual exclusive running of jobs.md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-06-16 10:44:49 +0200
committerJasper Ras <jras@hostnet.nl>2025-06-16 10:44:49 +0200
commit0d389e1d6c1aed4a92f82d9711f4564a12390fcd (patch)
treeca4925547669a045d836c2aeb6d4b2309c3f5996 /Resource groups for mutual exclusive running of jobs.md
parent32422d2b9001291d7136036581122cf4b4eec75c (diff)
vault backup: 2025-06-16 10:44:49
Diffstat (limited to 'Resource groups for mutual exclusive running of jobs.md')
-rw-r--r--Resource groups for mutual exclusive running of jobs.md23
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