summaryrefslogtreecommitdiff
path: root/tests/fixtures
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-09-16 16:52:44 +0000
committerGerrit Code Review <review@openstack.org>2022-09-16 16:52:44 +0000
commite612a442e37dc0fff00fe6bb2a219fa42c005c2a (patch)
tree110da0aeebfccd6fe9c3eb11fca0c7087fcb74f9 /tests/fixtures
parent9a83b7da5964643d6c38328f4d896b9b9b4de447 (diff)
parent1958bbad03d4c2eb59502df8682bdfcb248400c2 (diff)
downloadzuul-e612a442e37dc0fff00fe6bb2a219fa42c005c2a.tar.gz
Merge "Add nodeset alternatives"
Diffstat (limited to 'tests/fixtures')
-rw-r--r--tests/fixtures/layouts/nodeset-alternatives.yaml14
-rw-r--r--tests/fixtures/layouts/nodeset-fallback.yaml66
2 files changed, 80 insertions, 0 deletions
diff --git a/tests/fixtures/layouts/nodeset-alternatives.yaml b/tests/fixtures/layouts/nodeset-alternatives.yaml
new file mode 100644
index 000000000..21f9f11ae
--- /dev/null
+++ b/tests/fixtures/layouts/nodeset-alternatives.yaml
@@ -0,0 +1,14 @@
+- nodeset:
+ name: fast-nodeset
+ nodes:
+ - name: controller
+ label: fast-label
+
+- job:
+ name: test-job
+ nodeset:
+ alternatives:
+ - fast-nodeset
+ - nodes:
+ - name: controller
+ label: slow-label
diff --git a/tests/fixtures/layouts/nodeset-fallback.yaml b/tests/fixtures/layouts/nodeset-fallback.yaml
new file mode 100644
index 000000000..01869537e
--- /dev/null
+++ b/tests/fixtures/layouts/nodeset-fallback.yaml
@@ -0,0 +1,66 @@
+- pipeline:
+ name: check
+ manager: independent
+ trigger:
+ gerrit:
+ - event: patchset-created
+ success:
+ gerrit:
+ Verified: 1
+ failure:
+ gerrit:
+ Verified: -1
+
+- nodeset:
+ name: fast-nodeset
+ nodes:
+ - label: fast-label
+ name: controller
+
+- nodeset:
+ name: red-nodeset
+ nodes:
+ - label: red-label
+ name: controller
+
+- nodeset:
+ name: blue-nodeset
+ nodes:
+ - label: blue-label
+ name: controller
+
+# This adds an unused second level of alternatives to verify we are
+# able to flatten it.
+- nodeset:
+ name: red-or-blue-nodeset
+ alternatives:
+ - red-nodeset
+ - blue-nodeset
+
+# Test alternatives by name or anonymous nodeset
+- nodeset:
+ name: fast-or-slow
+ alternatives:
+ - fast-nodeset
+ - nodes:
+ label: slow-label
+ name: controller
+ - red-or-blue-nodeset
+
+- job:
+ name: base
+ parent: null
+ run: playbooks/base.yaml
+
+- job:
+ name: check-job
+ nodeset: fast-or-slow
+
+- project:
+ name: org/project
+ check:
+ jobs:
+ - check-job
+ gate:
+ jobs:
+ - check-job