From 6d776a12d037c825f47f2abd767ba59978befd5e Mon Sep 17 00:00:00 2001 From: Lukas Holecek Date: Sep 18 2018 11:22:06 +0000 Subject: Add productmd-compose schemas and examples --- diff --git a/examples/productmd-compose.test.complete.json b/examples/productmd-compose.test.complete.json new file mode 100644 index 0000000..9e843ea --- /dev/null +++ b/examples/productmd-compose.test.complete.json @@ -0,0 +1,30 @@ +{ + "ci": { + "url": "https://somewhere.com", + "docs": "https://somewhere.com/user-documentation", + "team": "RTT", + "email": "rtt@somewhere.com", + "name": "RTT CI" + }, + "run": { + "url": "https://rtt.somewhere.com/job/compose-RHEL-ALT-7-nightly-tier2-acceptance/arch=aarch64,variant=Server/1/", + "log": "https://rtt.somewhere.com/job/compose-RHEL-ALT-7-nightly-tier2-acceptance/arch=aarch64,variant=Server/1/consoleText" + }, + "system": [ + { + "variant": "Server", + "architecture": "aarch64", + "provider": "beaker" + } + ], + "artifact": { + "type": "productmd-compose", + "compose_id": "RHEL-ALT-7-20180101.n.0" + }, + "type": "acceptance", + "category": "validation", + "status": "passed", + "namespace": "rtt", + "generated_at": "2018-01-01 00:01:00.000000", + "version": "0.1.0" +} diff --git a/examples/productmd-compose.test.error.json b/examples/productmd-compose.test.error.json new file mode 100644 index 0000000..83ac930 --- /dev/null +++ b/examples/productmd-compose.test.error.json @@ -0,0 +1,30 @@ +{ + "ci": { + "url": "https://somewhere.com", + "docs": "https://somewhere.com/user-documentation", + "team": "RTT", + "email": "rtt@somewhere.com", + "name": "RTT CI" + }, + "run": { + "url": "https://rtt.somewhere.com/job/compose-RHEL-ALT-7-nightly-tier2-acceptance/arch=aarch64,variant=Server/2/", + "log": "https://rtt.somewhere.com/job/compose-RHEL-ALT-7-nightly-tier2-acceptance/arch=aarch64,variant=Server/2/consoleText" + }, + "system": [ + { + "variant": "Server", + "architecture": "aarch64", + "provider": "beaker" + } + ], + "artifact": { + "type": "productmd-compose", + "compose_id": "RHEL-ALT-7-20180102.n.0" + }, + "type": "acceptance", + "category": "validation", + "reason": "CI pipeline aborted", + "namespace": "rtt", + "generated_at": "2018-01-01 00:00:02.000000", + "version": "0.1.0" +} diff --git a/examples/productmd-compose.test.queued.json b/examples/productmd-compose.test.queued.json new file mode 100644 index 0000000..93b31ca --- /dev/null +++ b/examples/productmd-compose.test.queued.json @@ -0,0 +1,22 @@ +{ + "ci": { + "url": "https://somewhere.com", + "docs": "https://somewhere.com/user-documentation", + "team": "RTT", + "email": "rtt@somewhere.com", + "name": "RTT CI" + }, + "run": { + "url": "https://rtt.somewhere.com/job/compose-RHEL-ALT-7-nightly-tier2-acceptance/arch=aarch64,variant=Server/1/", + "log": "https://rtt.somewhere.com/job/compose-RHEL-ALT-7-nightly-tier2-acceptance/arch=aarch64,variant=Server/1/consoleText" + }, + "artifact": { + "type": "productmd-compose", + "compose_id": "RHEL-ALT-7-20180101.n.0" + }, + "type": "acceptance", + "category": "validation", + "namespace": "rtt", + "generated_at": "2018-01-01 00:00:00.000000", + "version": "0.1.0" +} diff --git a/examples/productmd-compose.test.running.json b/examples/productmd-compose.test.running.json new file mode 100644 index 0000000..35546f2 --- /dev/null +++ b/examples/productmd-compose.test.running.json @@ -0,0 +1,23 @@ +{ + "ci": { + "url": "https://somewhere.com", + "docs": "https://somewhere.com/user-documentation", + "team": "RTT", + "email": "rtt@somewhere.com", + "name": "RTT CI" + }, + "run": { + "url": "https://rtt.somewhere.com/job/compose-RHEL-ALT-7-nightly-tier2-acceptance/arch=aarch64,variant=Server/1/", + "log": "https://rtt.somewhere.com/job/compose-RHEL-ALT-7-nightly-tier2-acceptance/arch=aarch64,variant=Server/1/consoleText" + }, + "artifact": { + "type": "productmd-compose", + "compose_id": "RHEL-ALT-7-20180101.n.0" + }, + "type": "acceptance", + "category": "validation", + "namespace": "rtt", + "lifetime": 1, + "generated_at": "2018-01-01 00:00:01.000000", + "version": "0.1.0" +} diff --git a/schemas/productmd-compose-system.yaml b/schemas/productmd-compose-system.yaml new file mode 100644 index 0000000..3ffb5c4 --- /dev/null +++ b/schemas/productmd-compose-system.yaml @@ -0,0 +1,21 @@ +$id: https://pagure.io/fedora-ci/messages/productmd-compose-system +$schema: http://json-schema.org/draft-07/schema# + +description: + Information about the system used for compose testing. + +properties: + provider: + $ref: system.json#properties/provider + architecture: + $ref: system.json#properties/architecture + variant: + $ref: system.json#properties/variant + label: + $ref: system.json#properties/label + +required: + - provider + - architecture + +type: object diff --git a/schemas/productmd-compose.test.complete.yaml b/schemas/productmd-compose.test.complete.yaml new file mode 100644 index 0000000..0b8f71b --- /dev/null +++ b/schemas/productmd-compose.test.complete.yaml @@ -0,0 +1,52 @@ +$id: https://pagure.io/fedora-ci/messages/productmd-compose.test.complete +$schema: http://json-schema.org/draft-07/schema# + +description: + Testing of the compose has been completed. + This is a mandatory message. + +properties: + ci: + $ref: contact.json + run: + $ref: run.json + artifact: + $ref: productmd-compose.json + system: + type: array + items: + $ref: productmd-compose-system.json + category: + $ref: common.json#properties/category + type: + $ref: common.json#properties/type + label: + $ref: common.json#properties/label + status: + $ref: common.json#properties/status + recipients: + $ref: common.json#properties/recipients + thread_id: + $ref: common.json#properties/thread_id + namespace: + $ref: common.json#properties/namespace + note: + $ref: common.json#properties/note + generated_at: + $ref: common.json#properties/generated_at + version: + $ref: common.json#properties/version + +required: + - ci + - run + - artifact + - system + - type + - category + - status + - namespace + - generated_at + - version + +type: object diff --git a/schemas/productmd-compose.test.error.yaml b/schemas/productmd-compose.test.error.yaml new file mode 100644 index 0000000..b8bf9eb --- /dev/null +++ b/schemas/productmd-compose.test.error.yaml @@ -0,0 +1,56 @@ +$id: https://pagure.io/fedora-ci/messages/productmd-compose.test.error +$schema: http://json-schema.org/draft-07/schema# + +description: + Testing has aborted, it was not finished, e.g. because of infrastructure + error, CI system error, etc. Note that a test failure is not an error. + Test failures should be exposed under the productmd-compose.test.error + topic. This is a mandatory message. + +properties: + ci: + $ref: contact.json + run: + $ref: run.json + artifact: + $ref: productmd-compose.json + system: + type: array + items: + $ref: productmd-compose-system.json + category: + $ref: common.json#properties/category + type: + $ref: common.json#properties/type + label: + $ref: common.json#properties/label + reason: + $ref: common.json#properties/reason + issue_url: + $ref: common.json#properties/issue_url + recipients: + $ref: common.json#properties/recipients + thread_id: + $ref: common.json#properties/thread_id + namespace: + $ref: common.json#properties/namespace + note: + $ref: common.json#properties/note + generated_at: + $ref: common.json#properties/generated_at + version: + $ref: common.json#properties/version + +required: + - ci + - run + - artifact + - system + - type + - category + - namespace + - reason + - generated_at + - version + +type: object diff --git a/schemas/productmd-compose.test.queued.yaml b/schemas/productmd-compose.test.queued.yaml new file mode 100644 index 0000000..162ca66 --- /dev/null +++ b/schemas/productmd-compose.test.queued.yaml @@ -0,0 +1,42 @@ +$id: https://pagure.io/fedora-ci/messages/productmd-compose.test.queued +$schema: http://json-schema.org/draft-07/schema# + +description: + Testing has been queued, but not yet started. + This is an optional message. + +properties: + ci: + $ref: contact.json + run: + $ref: run.json + artifact: + $ref: productmd-compose.json + category: + $ref: common.json#properties/category + type: + $ref: common.json#properties/type + label: + $ref: common.json#properties/label + thread_id: + $ref: common.json#properties/thread_id + namespace: + $ref: common.json#properties/namespace + note: + $ref: common.json#properties/note + generated_at: + $ref: common.json#properties/generated_at + version: + $ref: common.json#properties/version + +required: + - ci + - run + - artifact + - type + - category + - namespace + - generated_at + - version + +type: object diff --git a/schemas/productmd-compose.test.running.yaml b/schemas/productmd-compose.test.running.yaml new file mode 100644 index 0000000..7a9c2f4 --- /dev/null +++ b/schemas/productmd-compose.test.running.yaml @@ -0,0 +1,46 @@ +$id: https://pagure.io/fedora-ci/messages/productmd-compose.test.running +$schema: http://json-schema.org/draft-07/schema# + +description: + Testing has been started and is in progress. + This is an optional message. + +properties: + ci: + $ref: contact.json + run: + $ref: run.json + artifact: + $ref: productmd-compose.json + category: + $ref: common.json#properties/category + type: + $ref: common.json#properties/type + label: + $ref: common.json#properties/label + lifetime: + $ref: common.json#properties/lifetime + thread_id: + $ref: common.json#properties/thread_id + namespace: + $ref: common.json#properties/namespace + note: + $ref: common.json#properties/note + progress: + $ref: common.json#properties/progress + generated_at: + $ref: common.json#properties/generated_at + version: + $ref: common.json#properties/version + +required: + - ci + - run + - artifact + - type + - category + - namespace + - generated_at + - version + +type: object diff --git a/schemas/productmd-compose.yaml b/schemas/productmd-compose.yaml new file mode 100644 index 0000000..f40d0b1 --- /dev/null +++ b/schemas/productmd-compose.yaml @@ -0,0 +1,26 @@ +$id: https://pagure.io/fedora-ci/messages/productmd-compose +$schema: http://json-schema.org/draft-07/schema# + +description: + Details about the compose being tested. + +properties: + type: + description: + Artifact type, in this case 'productmd-compose'. + enum: + - productmd-compose + type: string + compose_id: + description: + ID of the compose as recorded in the productmd metadata + (payload.compose.id field inside the metadata/composeinfo.json file) + examples: + - RHEL-7.4-20180531.2 + type: string + +required: + - type + - compose_id + +type: object