Alter config format to lists of dictionaries
Rather than the previous dictionary of lists.
Change-Id: I0f8ffba15da489da097b14388699685f22b0579f
diff --git a/tests/fixtures/config/in-repo/common.yaml b/tests/fixtures/config/in-repo/common.yaml
index f38406b..58b2051 100644
--- a/tests/fixtures/config/in-repo/common.yaml
+++ b/tests/fixtures/config/in-repo/common.yaml
@@ -1,5 +1,5 @@
-pipelines:
- - name: check
+- pipeline:
+ name: check
manager: independent
source:
gerrit
@@ -13,7 +13,8 @@
gerrit:
verified: -1
- - name: tenant-one-gate
+- pipeline:
+ name: tenant-one-gate
manager: dependent
success-message: Build succeeded (tenant-one-gate).
source:
diff --git a/tests/fixtures/config/in-repo/main.yaml b/tests/fixtures/config/in-repo/main.yaml
index df7dadd..e8b7665 100644
--- a/tests/fixtures/config/in-repo/main.yaml
+++ b/tests/fixtures/config/in-repo/main.yaml
@@ -1,5 +1,5 @@
-tenants:
- - name: tenant-one
+- tenant:
+ name: tenant-one
include:
- common.yaml
source:
diff --git a/tests/fixtures/config/multi-tenant/common.yaml b/tests/fixtures/config/multi-tenant/common.yaml
index 8fc3bba..6014227 100644
--- a/tests/fixtures/config/multi-tenant/common.yaml
+++ b/tests/fixtures/config/multi-tenant/common.yaml
@@ -1,5 +1,5 @@
-pipelines:
- - name: check
+- pipeline:
+ name: check
manager: independent
source:
gerrit
diff --git a/tests/fixtures/config/multi-tenant/main.yaml b/tests/fixtures/config/multi-tenant/main.yaml
index b9eaa14..b9d780c 100644
--- a/tests/fixtures/config/multi-tenant/main.yaml
+++ b/tests/fixtures/config/multi-tenant/main.yaml
@@ -1,9 +1,11 @@
-tenants:
- - name: tenant-one
+- tenant:
+ name: tenant-one
include:
- common.yaml
- tenant-one.yaml
- - name: tenant-two
+
+- tenant:
+ name: tenant-two
include:
- common.yaml
- tenant-two.yaml
diff --git a/tests/fixtures/config/multi-tenant/tenant-one.yaml b/tests/fixtures/config/multi-tenant/tenant-one.yaml
index 874e932..86a98da 100644
--- a/tests/fixtures/config/multi-tenant/tenant-one.yaml
+++ b/tests/fixtures/config/multi-tenant/tenant-one.yaml
@@ -1,5 +1,5 @@
-pipelines:
- - name: tenant-one-gate
+- pipeline:
+ name: tenant-one-gate
manager: dependent
success-message: Build succeeded (tenant-one-gate).
source:
@@ -21,12 +21,12 @@
verified: 0
precedence: high
-jobs:
- - name:
+- job:
+ name:
project1-test1
-projects:
- - name: org/project1
+- project:
+ name: org/project1
check:
jobs:
- project1-test1
diff --git a/tests/fixtures/config/multi-tenant/tenant-two.yaml b/tests/fixtures/config/multi-tenant/tenant-two.yaml
index 254d9cd..3f80a95 100644
--- a/tests/fixtures/config/multi-tenant/tenant-two.yaml
+++ b/tests/fixtures/config/multi-tenant/tenant-two.yaml
@@ -1,5 +1,5 @@
-pipelines:
- - name: tenant-two-gate
+- pipeline:
+ name: tenant-two-gate
manager: dependent
success-message: Build succeeded (tenant-two-gate).
source:
@@ -21,12 +21,12 @@
verified: 0
precedence: high
-jobs:
- - name:
+- job:
+ name:
project2-test1
-projects:
- - name: org/project2
+- project:
+ name: org/project2
check:
jobs:
- project2-test1
diff --git a/tests/fixtures/config/project-template/common.yaml b/tests/fixtures/config/project-template/common.yaml
index 9e76bde..c6b237f 100644
--- a/tests/fixtures/config/project-template/common.yaml
+++ b/tests/fixtures/config/project-template/common.yaml
@@ -1,5 +1,5 @@
-pipelines:
- - name: check
+- pipeline:
+ name: check
manager: independent
source:
gerrit
@@ -13,7 +13,8 @@
gerrit:
verified: -1
- - name: gate
+- pipeline:
+ name: gate
manager: dependent
success-message: Build succeeded (gate).
source:
@@ -35,20 +36,22 @@
verified: 0
precedence: high
-jobs:
- - name:
+- job:
+ name:
project-test1
- - name:
+
+- job:
+ name:
project-test2
-project-templates:
- - name: test-template
+- project-template:
+ name: test-template
gate:
jobs:
- project-test2
-projects:
- - name: org/project
+- project:
+ name: org/project
templates:
- test-template
gate:
diff --git a/tests/fixtures/config/project-template/main.yaml b/tests/fixtures/config/project-template/main.yaml
index c89fdfa..25dea57 100644
--- a/tests/fixtures/config/project-template/main.yaml
+++ b/tests/fixtures/config/project-template/main.yaml
@@ -1,4 +1,4 @@
-tenants:
- - name: tenant-one
+- tenant:
+ name: tenant-one
include:
- common.yaml
diff --git a/tests/fixtures/config/project-template/tenant-one.yaml b/tests/fixtures/config/project-template/tenant-one.yaml
deleted file mode 100644
index c9096ef..0000000
--- a/tests/fixtures/config/project-template/tenant-one.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-pipelines:
- - name: tenant-one-gate
- manager: dependent
- success-message: Build succeeded (tenant-one-gate).
- source:
- gerrit
- trigger:
- gerrit:
- - event: comment-added
- approval:
- - approved: 1
- success:
- gerrit:
- verified: 2
- submit: true
- failure:
- gerrit:
- verified: -2
- start:
- gerrit:
- verified: 0
- precedence: high
-
-jobs:
- - name:
- project1-test1
-
-projects:
- - name: org/project1
- check:
- - project1-test1
- tenant-one-gate:
- - project1-test1