From f1aafdb54dfa7177fa819ec4b51da0f9d48af132 Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Mon, 4 Mar 2024 20:30:09 +0000 Subject: [PATCH] Add an optional schemaUri to the context (#184) * Add an optional schemaURI to the context Add schemaURI to the context. It can be used to link to a custom schema that further refines the event content. Context: - https://github.com/cdevents/spec/issues/168 - https://github.com/cdevents/spec/issues/91 Fixes: #91 Signed-off-by: Andrea Frittoli --- continuous-deployment.md | 16 +++++++------- continuous-integration.md | 8 +++---- continuous-operations.md | 6 +++--- core.md | 10 ++++----- examples/artifact_deleted.json | 3 ++- examples/artifact_downloaded.json | 3 ++- examples/artifact_packaged.json | 3 ++- examples/artifact_published.json | 3 ++- examples/artifact_signed.json | 5 +++-- examples/branch_created.json | 5 +++-- examples/branch_deleted.json | 5 +++-- examples/build_finished.json | 5 +++-- examples/build_queued.json | 5 +++-- examples/build_started.json | 5 +++-- examples/change_abandoned.json | 5 +++-- examples/change_created.json | 5 +++-- examples/change_merged.json | 5 +++-- examples/change_reviewed.json | 5 +++-- examples/change_updated.json | 5 +++-- examples/environment_created.json | 5 +++-- examples/environment_deleted.json | 5 +++-- examples/environment_modified.json | 5 +++-- examples/incident_detected.json | 2 +- examples/incident_reported.json | 2 +- examples/incident_resolved.json | 2 +- examples/pipelinerun_finished.json | 5 +++-- examples/pipelinerun_queued.json | 5 +++-- examples/pipelinerun_started.json | 5 +++-- examples/repository_created.json | 5 +++-- examples/repository_deleted.json | 5 +++-- examples/repository_modified.json | 5 +++-- examples/service_deployed.json | 5 +++-- examples/service_published.json | 5 +++-- examples/service_removed.json | 5 +++-- examples/service_rolledback.json | 5 +++-- examples/service_upgraded.json | 5 +++-- examples/taskrun_finished.json | 5 +++-- examples/taskrun_started.json | 5 +++-- examples/testcaserun_finished.json | 5 +++-- examples/testcaserun_queued.json | 5 +++-- examples/testcaserun_started.json | 5 +++-- examples/testoutput_published.json | 5 +++-- examples/testsuiterun_finished.json | 5 +++-- examples/testsuiterun_queued.json | 5 +++-- examples/testsuiterun_started.json | 5 +++-- schemas/artifactdeleted.json | 5 +++++ schemas/artifactdownloaded.json | 5 +++++ schemas/artifactpackaged.json | 5 +++++ schemas/artifactpublished.json | 5 +++++ schemas/artifactsigned.json | 9 ++++++-- schemas/branchcreated.json | 9 ++++++-- schemas/branchdeleted.json | 9 ++++++-- schemas/buildfinished.json | 9 ++++++-- schemas/buildqueued.json | 9 ++++++-- schemas/buildstarted.json | 9 ++++++-- schemas/changeabandoned.json | 9 ++++++-- schemas/changecreated.json | 9 ++++++-- schemas/changemerged.json | 9 ++++++-- schemas/changereviewed.json | 9 ++++++-- schemas/changeupdated.json | 9 ++++++-- schemas/environmentcreated.json | 9 ++++++-- schemas/environmentdeleted.json | 9 ++++++-- schemas/environmentmodified.json | 9 ++++++-- schemas/incidentdetected.json | 9 ++++++-- schemas/incidentreported.json | 9 ++++++-- schemas/incidentresolved.json | 9 ++++++-- schemas/pipelinerunfinished.json | 9 ++++++-- schemas/pipelinerunqueued.json | 9 ++++++-- schemas/pipelinerunstarted.json | 9 ++++++-- schemas/repositorycreated.json | 9 ++++++-- schemas/repositorydeleted.json | 9 ++++++-- schemas/repositorymodified.json | 9 ++++++-- schemas/servicedeployed.json | 9 ++++++-- schemas/servicepublished.json | 9 ++++++-- schemas/serviceremoved.json | 9 ++++++-- schemas/servicerolledback.json | 9 ++++++-- schemas/serviceupgraded.json | 9 ++++++-- schemas/taskrunfinished.json | 9 ++++++-- schemas/taskrunstarted.json | 9 ++++++-- schemas/testcaserunfinished.json | 9 ++++++-- schemas/testcaserunqueued.json | 9 ++++++-- schemas/testcaserunstarted.json | 9 ++++++-- schemas/testoutputpublished.json | 9 ++++++-- schemas/testsuiterunfinished.json | 9 ++++++-- schemas/testsuiterunqueued.json | 9 ++++++-- schemas/testsuiterunstarted.json | 9 ++++++-- source-code-version-control.md | 20 ++++++++--------- spec.md | 33 ++++++++++++++++++++++++++++- testing-events.md | 14 ++++++------ tools/event-version.sh | 31 +++++++++++++++++++++------ 90 files changed, 486 insertions(+), 193 deletions(-) diff --git a/continuous-deployment.md b/continuous-deployment.md index 9317fe8d..1fe9da2e 100644 --- a/continuous-deployment.md +++ b/continuous-deployment.md @@ -51,7 +51,7 @@ A `service` can represent for example a binary that is running, a daemon, an app This event represents an environment that has been created. Such an environment can be used to deploy services in. -- Event Type: __`dev.cdevents.environment.created.0.1.1`__ +- Event Type: __`dev.cdevents.environment.created.0.2.0-draft`__ - Predicate: created - Subject: [`environment`](#environment) @@ -67,7 +67,7 @@ This event represents an environment that has been created. Such an environment This event represents an environment that has been modified. -- Event Type: __`dev.cdevents.environment.modified.0.1.1`__ +- Event Type: __`dev.cdevents.environment.modified.0.2.0-draft`__ - Predicate: modified - Subject: [`environment`](#environment) @@ -83,7 +83,7 @@ This event represents an environment that has been modified. This event represents an environment that has been deleted.``` -- Event Type: __`dev.cdevents.environment.deleted.0.1.1`__ +- Event Type: __`dev.cdevents.environment.deleted.0.2.0-draft`__ - Predicate: deleted - Subject: [`environment`](#environment) @@ -98,7 +98,7 @@ This event represents an environment that has been deleted.``` This event represents a new instance of a service that has been deployed -- Event Type: __`dev.cdevents.service.deployed.0.1.1`__ +- Event Type: __`dev.cdevents.service.deployed.0.2.0-draft`__ - Predicate: deployed - Subject: [`service`](#service) @@ -114,7 +114,7 @@ This event represents a new instance of a service that has been deployed This event represents an existing instance of a service that has been upgraded to a new version -- Event Type: __`dev.cdevents.service.upgraded.0.1.1`__ +- Event Type: __`dev.cdevents.service.upgraded.0.2.0-draft`__ - Predicate: upgraded - Subject: [`service`](#service) @@ -130,7 +130,7 @@ This event represents an existing instance of a service that has been upgraded t This event represents an existing instance of a service that has been rolled back to a previous version -- Event Type: __`dev.cdevents.service.rolledback.0.1.1`__ +- Event Type: __`dev.cdevents.service.rolledback.0.2.0-draft`__ - Predicate: rolledback - Subject: [`service`](#service) @@ -146,7 +146,7 @@ This event represents an existing instance of a service that has been rolled bac This event represents the removal of a previously deployed service instance and is thus not longer present in the specified environment -- Event Type: __`dev.cdevents.service.removed.0.1.1`__ +- Event Type: __`dev.cdevents.service.removed.0.2.0-draft`__ - Predicate: removed - Subject: [`service`](#service) @@ -161,7 +161,7 @@ This event represents the removal of a previously deployed service instance and This event represents an existing instance of a service that has an accessible URL for users to interact with it. This event can be used to let other tools know that the service is ready and also available for consumption. -- Event Type: __`dev.cdevents.service.published.0.1.1`__ +- Event Type: __`dev.cdevents.service.published.0.2.0-draft`__ - Predicate: published - Subject: [`service`](#service) diff --git a/continuous-integration.md b/continuous-integration.md index 06ccc86d..96578dbb 100644 --- a/continuous-integration.md +++ b/continuous-integration.md @@ -56,7 +56,7 @@ An `artifact` is usually produced as output of a build process. Events need to b This event represents a Build task that has been queued; this build process usually is in charge of producing a binary from source code. -- Event Type: __`dev.cdevents.build.queued.0.1.1`__ +- Event Type: __`dev.cdevents.build.queued.0.2.0-draft`__ - Predicate: queued - Subject: [`build`](#build) @@ -70,7 +70,7 @@ This event represents a Build task that has been queued; this build process usua This event represents a Build task that has been started; this build process usually is in charge of producing a binary from source code. -- Event Type: __`dev.cdevents.build.started.0.1.1`__ +- Event Type: __`dev.cdevents.build.started.0.2.0-draft`__ - Predicate: started - Subject: [`build`](#build) @@ -84,7 +84,7 @@ This event represents a Build task that has been started; this build process usu This event represents a Build task that has finished. This event will eventually contain the finished status, success, error or failure -- Event Type: __`dev.cdevents.build.finished.0.1.1`__ +- Event Type: __`dev.cdevents.build.finished.0.2.0-draft`__ - Predicate: finished - Subject: [`build`](#build) @@ -117,7 +117,7 @@ This event is usually produced by the build system. If an SBOM URI is available The event represents an artifact that has been signed. The signature is included in the events itself. An artifact may be signed after it has been packaged or sometimes after it has published, depending on the tooling being used and the type of artifact. The `artifact signed` event is typically produced by the CI or build system. -- Event Type: __`dev.cdevents.artifact.signed.0.1.0`__ +- Event Type: __`dev.cdevents.artifact.signed.0.2.0-draft`__ - Predicate: signed - Subject: [`artifact`](#artifact) diff --git a/continuous-operations.md b/continuous-operations.md index 9a2efedb..3c785754 100644 --- a/continuous-operations.md +++ b/continuous-operations.md @@ -40,7 +40,7 @@ An `incident` represents a problem in a production environment. This event represents an incident that has been detected by a system or human. -- Event Type: __`dev.cdevents.incident.detected.0.1.0`__ +- Event Type: __`dev.cdevents.incident.detected.0.2.0-draft`__ - Predicate: detected - Subject: [`incident`](#incident) @@ -58,7 +58,7 @@ This event represents an incident that has been detected by a system or human. This event represents an incident that has been reported through a ticketing system. Compared to the `detected` predicated, it introduces a ticket URI. -- Event Type: __`dev.cdevents.incident.reported.0.1.0`__ +- Event Type: __`dev.cdevents.incident.reported.0.2.0-draft`__ - Predicate: reported - Subject: [`incident`](#incident) @@ -77,7 +77,7 @@ This event represents an incident that has been reported through a ticketing sys This event represents an incident that has been resolved, meaning that the problem identified by the incident has been solved or recalled. -- Event Type: __`dev.cdevents.incident.resolved.0.1.0`__ +- Event Type: __`dev.cdevents.incident.resolved.0.2.0-draft`__ - Predicate: resolved - Subject: [`incident`](#incident) diff --git a/core.md b/core.md index 116d66e0..8ac93ec9 100644 --- a/core.md +++ b/core.md @@ -68,7 +68,7 @@ Due the dynamic nature of Pipelines, most of actual work needs to be queued to happen in a distributed way, hence queued events are added. Adopters can choose to ignore these events if they don't apply to their use cases. -- Event Type: __`dev.cdevents.pipelinerun.queued.0.1.1`__ +- Event Type: __`dev.cdevents.pipelinerun.queued.0.2.0-draft`__ - Predicate: queued - Subject: [`pipelineRun`](#pipelinerun) @@ -84,7 +84,7 @@ to ignore these events if they don't apply to their use cases. A pipelineRun has started and it is running. -- Event Type: __`dev.cdevents.pipelinerun.started.0.1.1`__ +- Event Type: __`dev.cdevents.pipelinerun.started.0.2.0-draft`__ - Predicate: started - Subject: [`pipelineRun`](#pipelinerun) @@ -100,7 +100,7 @@ A pipelineRun has started and it is running. A pipelineRun has finished, successfully or not. -- Event Type: __`dev.cdevents.pipelinerun.finished.0.1.1`__ +- Event Type: __`dev.cdevents.pipelinerun.finished.0.2.0-draft`__ - Predicate: finished - Subject: [`pipelineRun`](#pipelinerun) @@ -118,7 +118,7 @@ A pipelineRun has finished, successfully or not. A taskRun has started and it is running. -- Event Type: __`dev.cdevents.taskrun.started.0.1.1`__ +- Event Type: __`dev.cdevents.taskrun.started.0.2.0-draft`__ - Predicate: started - Subject: [`taskRun`](#taskrun) @@ -135,7 +135,7 @@ A taskRun has started and it is running. A taskRun has finished, successfully or not. -- Event Type: __`dev.cdevents.taskrun.finished.0.1.1`__ +- Event Type: __`dev.cdevents.taskrun.finished.0.2.0-draft`__ - Predicate: finished - Subject: [`taskRun`](#taskrun) diff --git a/examples/artifact_deleted.json b/examples/artifact_deleted.json index a4536829..3fc642ba 100644 --- a/examples/artifact_deleted.json +++ b/examples/artifact_deleted.json @@ -4,7 +4,8 @@ "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", "type": "dev.cdevents.artifact.deleted.0.1.0-draft", - "timestamp": "2023-03-20T14:27:05.315384Z" + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c", diff --git a/examples/artifact_downloaded.json b/examples/artifact_downloaded.json index 94d0f718..054ab326 100644 --- a/examples/artifact_downloaded.json +++ b/examples/artifact_downloaded.json @@ -4,7 +4,8 @@ "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", "type": "dev.cdevents.artifact.downloaded.0.1.0-draft", - "timestamp": "2023-03-20T14:27:05.315384Z" + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c", diff --git a/examples/artifact_packaged.json b/examples/artifact_packaged.json index 238e20bb..2d0071f4 100644 --- a/examples/artifact_packaged.json +++ b/examples/artifact_packaged.json @@ -4,7 +4,8 @@ "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", "type": "dev.cdevents.artifact.packaged.0.2.0-draft", - "timestamp": "2023-03-20T14:27:05.315384Z" + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c", diff --git a/examples/artifact_published.json b/examples/artifact_published.json index 462a623f..b579aa1d 100644 --- a/examples/artifact_published.json +++ b/examples/artifact_published.json @@ -4,7 +4,8 @@ "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", "type": "dev.cdevents.artifact.published.0.2.0-draft", - "timestamp": "2023-03-20T14:27:05.315384Z" + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c", diff --git a/examples/artifact_signed.json b/examples/artifact_signed.json index de0a31d3..61506711 100644 --- a/examples/artifact_signed.json +++ b/examples/artifact_signed.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.artifact.signed.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.artifact.signed.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c", diff --git a/examples/branch_created.json b/examples/branch_created.json index 35256a4e..4f257399 100644 --- a/examples/branch_created.json +++ b/examples/branch_created.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.branch.created.0.1.2", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.branch.created.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/branch_deleted.json b/examples/branch_deleted.json index cc4760b5..96cec7b8 100644 --- a/examples/branch_deleted.json +++ b/examples/branch_deleted.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.branch.deleted.0.1.2", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.branch.deleted.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/build_finished.json b/examples/build_finished.json index 72db1245..4f463919 100644 --- a/examples/build_finished.json +++ b/examples/build_finished.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.build.finished.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.build.finished.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/build_queued.json b/examples/build_queued.json index 94e027b5..ab777d68 100644 --- a/examples/build_queued.json +++ b/examples/build_queued.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.build.queued.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.build.queued.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/build_started.json b/examples/build_started.json index b94974e4..ab6e6a41 100644 --- a/examples/build_started.json +++ b/examples/build_started.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.build.started.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.build.started.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/change_abandoned.json b/examples/change_abandoned.json index 6ff1e5c8..646161d4 100644 --- a/examples/change_abandoned.json +++ b/examples/change_abandoned.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.change.abandoned.0.1.2", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.change.abandoned.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/change_created.json b/examples/change_created.json index 61033df8..1dec9d65 100644 --- a/examples/change_created.json +++ b/examples/change_created.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.change.created.0.2.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.change.created.0.3.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/change_merged.json b/examples/change_merged.json index df502c11..ddef3d2b 100644 --- a/examples/change_merged.json +++ b/examples/change_merged.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.change.merged.0.1.2", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.change.merged.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/change_reviewed.json b/examples/change_reviewed.json index 4d942a10..8fb5393c 100644 --- a/examples/change_reviewed.json +++ b/examples/change_reviewed.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.change.reviewed.0.1.2", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.change.reviewed.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/change_updated.json b/examples/change_updated.json index aafe5232..a7d0c537 100644 --- a/examples/change_updated.json +++ b/examples/change_updated.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.change.updated.0.1.2", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.change.updated.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/environment_created.json b/examples/environment_created.json index 1e34350d..24db7b01 100644 --- a/examples/environment_created.json +++ b/examples/environment_created.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.environment.created.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.environment.created.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/environment_deleted.json b/examples/environment_deleted.json index ed9477e8..5e24297c 100644 --- a/examples/environment_deleted.json +++ b/examples/environment_deleted.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.environment.deleted.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.environment.deleted.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/environment_modified.json b/examples/environment_modified.json index 63af7049..5a794c6b 100644 --- a/examples/environment_modified.json +++ b/examples/environment_modified.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.environment.modified.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.environment.modified.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/incident_detected.json b/examples/incident_detected.json index cd08d5a7..318c7759 100644 --- a/examples/incident_detected.json +++ b/examples/incident_detected.json @@ -3,7 +3,7 @@ "version": "0.4.0-draft", "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", "source": "/monitoring/prod1", - "type": "dev.cdevents.incident.detected.0.1.0", + "type": "dev.cdevents.incident.detected.0.2.0-draft", "timestamp": "2022-11-11T13:52:20.079Z" }, "subject": { diff --git a/examples/incident_reported.json b/examples/incident_reported.json index 4524ebdd..0bff28dd 100644 --- a/examples/incident_reported.json +++ b/examples/incident_reported.json @@ -3,7 +3,7 @@ "version": "0.4.0-draft", "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", "source": "/monitoring/prod1", - "type": "dev.cdevents.incident.reported.0.1.0", + "type": "dev.cdevents.incident.reported.0.2.0-draft", "timestamp": "2022-11-11T13:52:20.079Z" }, "subject": { diff --git a/examples/incident_resolved.json b/examples/incident_resolved.json index 01ac6ac3..bbc70782 100644 --- a/examples/incident_resolved.json +++ b/examples/incident_resolved.json @@ -3,7 +3,7 @@ "version": "0.4.0-draft", "id": "F4BD2B55-B6F6-4F44-AF72-BD2D0E7A8708", "source": "/monitoring/prod1", - "type": "dev.cdevents.incident.resolved.0.1.0", + "type": "dev.cdevents.incident.resolved.0.2.0-draft", "timestamp": "2022-11-11T13:52:20.079Z" }, "subject": { diff --git a/examples/pipelinerun_finished.json b/examples/pipelinerun_finished.json index 9b79b12d..d4031eda 100644 --- a/examples/pipelinerun_finished.json +++ b/examples/pipelinerun_finished.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.pipelinerun.finished.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.pipelinerun.finished.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/pipelinerun_queued.json b/examples/pipelinerun_queued.json index 8c8db447..09564adc 100644 --- a/examples/pipelinerun_queued.json +++ b/examples/pipelinerun_queued.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.pipelinerun.queued.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.pipelinerun.queued.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/pipelinerun_started.json b/examples/pipelinerun_started.json index f1e5b2fe..cedb23ed 100644 --- a/examples/pipelinerun_started.json +++ b/examples/pipelinerun_started.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.pipelinerun.started.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.pipelinerun.started.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/repository_created.json b/examples/repository_created.json index 6f538fe5..0bd84ad0 100644 --- a/examples/repository_created.json +++ b/examples/repository_created.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.repository.created.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.repository.created.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/repository_deleted.json b/examples/repository_deleted.json index d79fe66b..20f420ec 100644 --- a/examples/repository_deleted.json +++ b/examples/repository_deleted.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.repository.deleted.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.repository.deleted.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/repository_modified.json b/examples/repository_modified.json index cae05758..5bfeafc5 100644 --- a/examples/repository_modified.json +++ b/examples/repository_modified.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.repository.modified.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.repository.modified.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/service_deployed.json b/examples/service_deployed.json index 2acdf239..dbc38082 100644 --- a/examples/service_deployed.json +++ b/examples/service_deployed.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.service.deployed.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.service.deployed.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/service_published.json b/examples/service_published.json index 5022b7ca..0134c110 100644 --- a/examples/service_published.json +++ b/examples/service_published.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.service.published.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.service.published.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/service_removed.json b/examples/service_removed.json index b2b9595b..06343144 100644 --- a/examples/service_removed.json +++ b/examples/service_removed.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.service.removed.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.service.removed.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/service_rolledback.json b/examples/service_rolledback.json index 8b95386e..bd4cdaa5 100644 --- a/examples/service_rolledback.json +++ b/examples/service_rolledback.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.service.rolledback.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.service.rolledback.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/service_upgraded.json b/examples/service_upgraded.json index 55690e1b..88da946c 100644 --- a/examples/service_upgraded.json +++ b/examples/service_upgraded.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.service.upgraded.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.service.upgraded.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/taskrun_finished.json b/examples/taskrun_finished.json index 427d6a98..bed709af 100644 --- a/examples/taskrun_finished.json +++ b/examples/taskrun_finished.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.taskrun.finished.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.taskrun.finished.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/taskrun_started.json b/examples/taskrun_started.json index e67391c6..c8560f44 100644 --- a/examples/taskrun_started.json +++ b/examples/taskrun_started.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.taskrun.started.0.1.1", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.taskrun.started.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "mySubject123", diff --git a/examples/testcaserun_finished.json b/examples/testcaserun_finished.json index 27b7387f..8f4f2dce 100644 --- a/examples/testcaserun_finished.json +++ b/examples/testcaserun_finished.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.testcaserun.finished.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.testcaserun.finished.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "myTestCaseRun123", diff --git a/examples/testcaserun_queued.json b/examples/testcaserun_queued.json index a8fd288a..292309ec 100644 --- a/examples/testcaserun_queued.json +++ b/examples/testcaserun_queued.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.testcaserun.queued.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.testcaserun.queued.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "myTestCaseRun123", diff --git a/examples/testcaserun_started.json b/examples/testcaserun_started.json index ea48aace..02e856ba 100644 --- a/examples/testcaserun_started.json +++ b/examples/testcaserun_started.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.testcaserun.started.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.testcaserun.started.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "myTestCaseRun123", diff --git a/examples/testoutput_published.json b/examples/testoutput_published.json index 86a8ccf1..de8c0f75 100644 --- a/examples/testoutput_published.json +++ b/examples/testoutput_published.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.testoutput.published.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.testoutput.published.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "testrunreport-12123", diff --git a/examples/testsuiterun_finished.json b/examples/testsuiterun_finished.json index 52ad44c9..e20c2ab5 100644 --- a/examples/testsuiterun_finished.json +++ b/examples/testsuiterun_finished.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.testsuiterun.finished.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.testsuiterun.finished.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "myTestSuiteRun123", diff --git a/examples/testsuiterun_queued.json b/examples/testsuiterun_queued.json index abab9178..cdec816a 100644 --- a/examples/testsuiterun_queued.json +++ b/examples/testsuiterun_queued.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.testsuiterun.queued.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.testsuiterun.queued.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "myTestSuiteRun123", diff --git a/examples/testsuiterun_started.json b/examples/testsuiterun_started.json index 61caadd0..dbf13a08 100644 --- a/examples/testsuiterun_started.json +++ b/examples/testsuiterun_started.json @@ -3,8 +3,9 @@ "version": "0.4.0-draft", "id": "271069a8-fc18-44f1-b38f-9d70a1695819", "source": "/event/source/123", - "type": "dev.cdevents.testsuiterun.started.0.1.0", - "timestamp": "2023-03-20T14:27:05.315384Z" + "type": "dev.cdevents.testsuiterun.started.0.2.0-draft", + "timestamp": "2023-03-20T14:27:05.315384Z", + "schemaUri": "https://myorg.com/schema/custom" }, "subject": { "id": "myTestSuiteRun123", diff --git a/schemas/artifactdeleted.json b/schemas/artifactdeleted.json index 926333bf..00dedbc7 100644 --- a/schemas/artifactdeleted.json +++ b/schemas/artifactdeleted.json @@ -27,6 +27,11 @@ "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/artifactdownloaded.json b/schemas/artifactdownloaded.json index b0d97a6f..36fd5132 100644 --- a/schemas/artifactdownloaded.json +++ b/schemas/artifactdownloaded.json @@ -27,6 +27,11 @@ "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/artifactpackaged.json b/schemas/artifactpackaged.json index e293f617..68df54f4 100644 --- a/schemas/artifactpackaged.json +++ b/schemas/artifactpackaged.json @@ -27,6 +27,11 @@ "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/artifactpublished.json b/schemas/artifactpublished.json index c66081c0..c1eb7f7c 100644 --- a/schemas/artifactpublished.json +++ b/schemas/artifactpublished.json @@ -27,6 +27,11 @@ "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/artifactsigned.json b/schemas/artifactsigned.json index 2b33d9a3..96a5cc2d 100644 --- a/schemas/artifactsigned.json +++ b/schemas/artifactsigned.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.artifact.signed.0.1.0" + "dev.cdevents.artifact.signed.0.2.0-draft" ], - "default": "dev.cdevents.artifact.signed.0.1.0" + "default": "dev.cdevents.artifact.signed.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/branchcreated.json b/schemas/branchcreated.json index 91bc0625..82c28c2d 100644 --- a/schemas/branchcreated.json +++ b/schemas/branchcreated.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.branch.created.0.1.2" + "dev.cdevents.branch.created.0.2.0-draft" ], - "default": "dev.cdevents.branch.created.0.1.2" + "default": "dev.cdevents.branch.created.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/branchdeleted.json b/schemas/branchdeleted.json index bd5e0d61..f22a8327 100644 --- a/schemas/branchdeleted.json +++ b/schemas/branchdeleted.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.branch.deleted.0.1.2" + "dev.cdevents.branch.deleted.0.2.0-draft" ], - "default": "dev.cdevents.branch.deleted.0.1.2" + "default": "dev.cdevents.branch.deleted.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/buildfinished.json b/schemas/buildfinished.json index e84ac9c4..f2572a77 100644 --- a/schemas/buildfinished.json +++ b/schemas/buildfinished.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.build.finished.0.1.1" + "dev.cdevents.build.finished.0.2.0-draft" ], - "default": "dev.cdevents.build.finished.0.1.1" + "default": "dev.cdevents.build.finished.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/buildqueued.json b/schemas/buildqueued.json index 999c07b4..96d7d1ef 100644 --- a/schemas/buildqueued.json +++ b/schemas/buildqueued.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.build.queued.0.1.1" + "dev.cdevents.build.queued.0.2.0-draft" ], - "default": "dev.cdevents.build.queued.0.1.1" + "default": "dev.cdevents.build.queued.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/buildstarted.json b/schemas/buildstarted.json index 27a9ab78..fae985df 100644 --- a/schemas/buildstarted.json +++ b/schemas/buildstarted.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.build.started.0.1.1" + "dev.cdevents.build.started.0.2.0-draft" ], - "default": "dev.cdevents.build.started.0.1.1" + "default": "dev.cdevents.build.started.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/changeabandoned.json b/schemas/changeabandoned.json index 55b6d05b..3c9c8bd3 100644 --- a/schemas/changeabandoned.json +++ b/schemas/changeabandoned.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.change.abandoned.0.1.2" + "dev.cdevents.change.abandoned.0.2.0-draft" ], - "default": "dev.cdevents.change.abandoned.0.1.2" + "default": "dev.cdevents.change.abandoned.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/changecreated.json b/schemas/changecreated.json index 79cf5501..5e11c9cc 100644 --- a/schemas/changecreated.json +++ b/schemas/changecreated.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.change.created.0.2.0" + "dev.cdevents.change.created.0.3.0-draft" ], - "default": "dev.cdevents.change.created.0.2.0" + "default": "dev.cdevents.change.created.0.3.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/changemerged.json b/schemas/changemerged.json index 311d7e17..639fda30 100644 --- a/schemas/changemerged.json +++ b/schemas/changemerged.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.change.merged.0.1.2" + "dev.cdevents.change.merged.0.2.0-draft" ], - "default": "dev.cdevents.change.merged.0.1.2" + "default": "dev.cdevents.change.merged.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/changereviewed.json b/schemas/changereviewed.json index 1192ce26..eaf7a4d6 100644 --- a/schemas/changereviewed.json +++ b/schemas/changereviewed.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.change.reviewed.0.1.2" + "dev.cdevents.change.reviewed.0.2.0-draft" ], - "default": "dev.cdevents.change.reviewed.0.1.2" + "default": "dev.cdevents.change.reviewed.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/changeupdated.json b/schemas/changeupdated.json index 8e88e91f..6dc26003 100644 --- a/schemas/changeupdated.json +++ b/schemas/changeupdated.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.change.updated.0.1.2" + "dev.cdevents.change.updated.0.2.0-draft" ], - "default": "dev.cdevents.change.updated.0.1.2" + "default": "dev.cdevents.change.updated.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/environmentcreated.json b/schemas/environmentcreated.json index 908a292d..598e15ec 100644 --- a/schemas/environmentcreated.json +++ b/schemas/environmentcreated.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.environment.created.0.1.1" + "dev.cdevents.environment.created.0.2.0-draft" ], - "default": "dev.cdevents.environment.created.0.1.1" + "default": "dev.cdevents.environment.created.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/environmentdeleted.json b/schemas/environmentdeleted.json index 7c98e8ac..52ea88e5 100644 --- a/schemas/environmentdeleted.json +++ b/schemas/environmentdeleted.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.environment.deleted.0.1.1" + "dev.cdevents.environment.deleted.0.2.0-draft" ], - "default": "dev.cdevents.environment.deleted.0.1.1" + "default": "dev.cdevents.environment.deleted.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/environmentmodified.json b/schemas/environmentmodified.json index c75db4c2..239fedfe 100644 --- a/schemas/environmentmodified.json +++ b/schemas/environmentmodified.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.environment.modified.0.1.1" + "dev.cdevents.environment.modified.0.2.0-draft" ], - "default": "dev.cdevents.environment.modified.0.1.1" + "default": "dev.cdevents.environment.modified.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/incidentdetected.json b/schemas/incidentdetected.json index 140e43f4..b77700f6 100644 --- a/schemas/incidentdetected.json +++ b/schemas/incidentdetected.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.incident.detected.0.1.0" + "dev.cdevents.incident.detected.0.2.0-draft" ], - "default": "dev.cdevents.incident.detected.0.1.0" + "default": "dev.cdevents.incident.detected.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/incidentreported.json b/schemas/incidentreported.json index cc0286c6..2a5f2b6c 100644 --- a/schemas/incidentreported.json +++ b/schemas/incidentreported.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.incident.reported.0.1.0" + "dev.cdevents.incident.reported.0.2.0-draft" ], - "default": "dev.cdevents.incident.reported.0.1.0" + "default": "dev.cdevents.incident.reported.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/incidentresolved.json b/schemas/incidentresolved.json index 2b4ae49d..259bfcbe 100644 --- a/schemas/incidentresolved.json +++ b/schemas/incidentresolved.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.incident.resolved.0.1.0" + "dev.cdevents.incident.resolved.0.2.0-draft" ], - "default": "dev.cdevents.incident.resolved.0.1.0" + "default": "dev.cdevents.incident.resolved.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/pipelinerunfinished.json b/schemas/pipelinerunfinished.json index b63e1210..30f254ec 100644 --- a/schemas/pipelinerunfinished.json +++ b/schemas/pipelinerunfinished.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.pipelinerun.finished.0.1.1" + "dev.cdevents.pipelinerun.finished.0.2.0-draft" ], - "default": "dev.cdevents.pipelinerun.finished.0.1.1" + "default": "dev.cdevents.pipelinerun.finished.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/pipelinerunqueued.json b/schemas/pipelinerunqueued.json index 5077f798..068b4f7c 100644 --- a/schemas/pipelinerunqueued.json +++ b/schemas/pipelinerunqueued.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.pipelinerun.queued.0.1.1" + "dev.cdevents.pipelinerun.queued.0.2.0-draft" ], - "default": "dev.cdevents.pipelinerun.queued.0.1.1" + "default": "dev.cdevents.pipelinerun.queued.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/pipelinerunstarted.json b/schemas/pipelinerunstarted.json index 122c1621..ac9947d9 100644 --- a/schemas/pipelinerunstarted.json +++ b/schemas/pipelinerunstarted.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.pipelinerun.started.0.1.1" + "dev.cdevents.pipelinerun.started.0.2.0-draft" ], - "default": "dev.cdevents.pipelinerun.started.0.1.1" + "default": "dev.cdevents.pipelinerun.started.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/repositorycreated.json b/schemas/repositorycreated.json index be351657..eff6cca6 100644 --- a/schemas/repositorycreated.json +++ b/schemas/repositorycreated.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.repository.created.0.1.1" + "dev.cdevents.repository.created.0.2.0-draft" ], - "default": "dev.cdevents.repository.created.0.1.1" + "default": "dev.cdevents.repository.created.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/repositorydeleted.json b/schemas/repositorydeleted.json index 4d10d11b..0ee4c51c 100644 --- a/schemas/repositorydeleted.json +++ b/schemas/repositorydeleted.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.repository.deleted.0.1.1" + "dev.cdevents.repository.deleted.0.2.0-draft" ], - "default": "dev.cdevents.repository.deleted.0.1.1" + "default": "dev.cdevents.repository.deleted.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/repositorymodified.json b/schemas/repositorymodified.json index b6e0049f..b2c331db 100644 --- a/schemas/repositorymodified.json +++ b/schemas/repositorymodified.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.repository.modified.0.1.1" + "dev.cdevents.repository.modified.0.2.0-draft" ], - "default": "dev.cdevents.repository.modified.0.1.1" + "default": "dev.cdevents.repository.modified.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/servicedeployed.json b/schemas/servicedeployed.json index 2b4dfd96..3276d4ea 100644 --- a/schemas/servicedeployed.json +++ b/schemas/servicedeployed.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.service.deployed.0.1.1" + "dev.cdevents.service.deployed.0.2.0-draft" ], - "default": "dev.cdevents.service.deployed.0.1.1" + "default": "dev.cdevents.service.deployed.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/servicepublished.json b/schemas/servicepublished.json index 090e7dc2..32a1c123 100644 --- a/schemas/servicepublished.json +++ b/schemas/servicepublished.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.service.published.0.1.1" + "dev.cdevents.service.published.0.2.0-draft" ], - "default": "dev.cdevents.service.published.0.1.1" + "default": "dev.cdevents.service.published.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/serviceremoved.json b/schemas/serviceremoved.json index 59006bab..70e29fa5 100644 --- a/schemas/serviceremoved.json +++ b/schemas/serviceremoved.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.service.removed.0.1.1" + "dev.cdevents.service.removed.0.2.0-draft" ], - "default": "dev.cdevents.service.removed.0.1.1" + "default": "dev.cdevents.service.removed.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/servicerolledback.json b/schemas/servicerolledback.json index 50d2f50e..2898a9e3 100644 --- a/schemas/servicerolledback.json +++ b/schemas/servicerolledback.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.service.rolledback.0.1.1" + "dev.cdevents.service.rolledback.0.2.0-draft" ], - "default": "dev.cdevents.service.rolledback.0.1.1" + "default": "dev.cdevents.service.rolledback.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/serviceupgraded.json b/schemas/serviceupgraded.json index 9edf90ae..080c376a 100644 --- a/schemas/serviceupgraded.json +++ b/schemas/serviceupgraded.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.service.upgraded.0.1.1" + "dev.cdevents.service.upgraded.0.2.0-draft" ], - "default": "dev.cdevents.service.upgraded.0.1.1" + "default": "dev.cdevents.service.upgraded.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/taskrunfinished.json b/schemas/taskrunfinished.json index 5e6b547e..33ddd48a 100644 --- a/schemas/taskrunfinished.json +++ b/schemas/taskrunfinished.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.taskrun.finished.0.1.1" + "dev.cdevents.taskrun.finished.0.2.0-draft" ], - "default": "dev.cdevents.taskrun.finished.0.1.1" + "default": "dev.cdevents.taskrun.finished.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/taskrunstarted.json b/schemas/taskrunstarted.json index 7873dd40..1c5ca741 100644 --- a/schemas/taskrunstarted.json +++ b/schemas/taskrunstarted.json @@ -20,13 +20,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.taskrun.started.0.1.1" + "dev.cdevents.taskrun.started.0.2.0-draft" ], - "default": "dev.cdevents.taskrun.started.0.1.1" + "default": "dev.cdevents.taskrun.started.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/testcaserunfinished.json b/schemas/testcaserunfinished.json index 47da6948..d267a2a1 100644 --- a/schemas/testcaserunfinished.json +++ b/schemas/testcaserunfinished.json @@ -19,13 +19,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.testcaserun.finished.0.1.0" + "dev.cdevents.testcaserun.finished.0.2.0-draft" ], - "default": "dev.cdevents.testcaserun.finished.0.1.0" + "default": "dev.cdevents.testcaserun.finished.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/testcaserunqueued.json b/schemas/testcaserunqueued.json index d3379bd2..c8ccef71 100644 --- a/schemas/testcaserunqueued.json +++ b/schemas/testcaserunqueued.json @@ -19,13 +19,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.testcaserun.queued.0.1.0" + "dev.cdevents.testcaserun.queued.0.2.0-draft" ], - "default": "dev.cdevents.testcaserun.queued.0.1.0" + "default": "dev.cdevents.testcaserun.queued.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/testcaserunstarted.json b/schemas/testcaserunstarted.json index 09444e07..672cb468 100644 --- a/schemas/testcaserunstarted.json +++ b/schemas/testcaserunstarted.json @@ -19,13 +19,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.testcaserun.started.0.1.0" + "dev.cdevents.testcaserun.started.0.2.0-draft" ], - "default": "dev.cdevents.testcaserun.started.0.1.0" + "default": "dev.cdevents.testcaserun.started.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/testoutputpublished.json b/schemas/testoutputpublished.json index 952011de..bdff3a9a 100644 --- a/schemas/testoutputpublished.json +++ b/schemas/testoutputpublished.json @@ -19,13 +19,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.testoutput.published.0.1.0" + "dev.cdevents.testoutput.published.0.2.0-draft" ], - "default": "dev.cdevents.testoutput.published.0.1.0" + "default": "dev.cdevents.testoutput.published.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/testsuiterunfinished.json b/schemas/testsuiterunfinished.json index 29049fd3..6e821c2f 100644 --- a/schemas/testsuiterunfinished.json +++ b/schemas/testsuiterunfinished.json @@ -19,13 +19,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.testsuiterun.finished.0.1.0" + "dev.cdevents.testsuiterun.finished.0.2.0-draft" ], - "default": "dev.cdevents.testsuiterun.finished.0.1.0" + "default": "dev.cdevents.testsuiterun.finished.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/testsuiterunqueued.json b/schemas/testsuiterunqueued.json index 3d255d51..96d995fa 100644 --- a/schemas/testsuiterunqueued.json +++ b/schemas/testsuiterunqueued.json @@ -19,13 +19,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.testsuiterun.queued.0.1.0" + "dev.cdevents.testsuiterun.queued.0.2.0-draft" ], - "default": "dev.cdevents.testsuiterun.queued.0.1.0" + "default": "dev.cdevents.testsuiterun.queued.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/testsuiterunstarted.json b/schemas/testsuiterunstarted.json index a9166ef2..c88de307 100644 --- a/schemas/testsuiterunstarted.json +++ b/schemas/testsuiterunstarted.json @@ -19,13 +19,18 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.testsuiterun.started.0.1.0" + "dev.cdevents.testsuiterun.started.0.2.0-draft" ], - "default": "dev.cdevents.testsuiterun.started.0.1.0" + "default": "dev.cdevents.testsuiterun.started.0.2.0-draft" }, "timestamp": { "type": "string", "format": "date-time" + }, + "schemaUri": { + "type": "string", + "minLength": 1, + "format": "uri" } }, "additionalProperties": false, diff --git a/source-code-version-control.md b/source-code-version-control.md index f224c348..07fc56d9 100644 --- a/source-code-version-control.md +++ b/source-code-version-control.md @@ -67,7 +67,7 @@ A `change` identifies a proposed set of changes to the content of a `repository` A new Source Code Repository was created to host source code for a project. -- Event Type: __`dev.cdevents.repository.created.0.1.1`__ +- Event Type: __`dev.cdevents.repository.created.0.2.0-draft`__ - Predicate: created - Subject: [`repository`](#repository) @@ -85,7 +85,7 @@ A new Source Code Repository was created to host source code for a project. A Source Code Repository modified some of its attributes, like location, or owner. -- Event Type: __`dev.cdevents.repository.modified.0.1.1`__ +- Event Type: __`dev.cdevents.repository.modified.0.2.0-draft`__ - Predicate: modified - Subject: [`repository`](#repository) @@ -101,7 +101,7 @@ A Source Code Repository modified some of its attributes, like location, or owne ### [`repository deleted`](examples/repository_deleted.json) -- Event Type: __`dev.cdevents.repository.deleted.0.1.1`__ +- Event Type: __`dev.cdevents.repository.deleted.0.2.0-draft`__ - Predicate: modified - Subject: [`repository`](#repository) @@ -119,7 +119,7 @@ A Source Code Repository modified some of its attributes, like location, or owne A branch inside the Repository was created. -- Event Type: __`dev.cdevents.branch.created.0.1.2`__ +- Event Type: __`dev.cdevents.branch.created.0.2.0-draft`__ - Predicate: created - Subject: [`branch`](#branch) @@ -134,7 +134,7 @@ A branch inside the Repository was created. A branch inside the Repository was deleted. -- Event Type: __`dev.cdevents.branch.deleted.0.1.2`__ +- Event Type: __`dev.cdevents.branch.deleted.0.2.0-draft`__ - Predicate: deleted - Subject: [`branch`](#branch) @@ -149,7 +149,7 @@ A branch inside the Repository was deleted. A source code change was created and submitted to a repository specific branch. Examples: PullRequest sent to Github, MergeRequest sent to Gitlab, Change created in Gerrit. -- Event Type: __`dev.cdevents.change.created.0.2.0`__ +- Event Type: __`dev.cdevents.change.created.0.3.0-draft`__ - Predicate: created - Subject: [`change`](#change) @@ -165,7 +165,7 @@ A source code change was created and submitted to a repository specific branch. Someone (user) or an automated system submitted an review to the source code change. A user or an automated system needs to be in charge of understanding how many approvals/rejections are needed for this change to be merged or rejected. The review event needs to include if the change is approved by the reviewer, more changes are needed or if the change is rejected. -- Event Type: __`dev.cdevents.change.reviewed.0.1.2`__ +- Event Type: __`dev.cdevents.change.reviewed.0.2.0-draft`__ - Predicate: reviewed - Subject: [`change`](#change) @@ -180,7 +180,7 @@ Someone (user) or an automated system submitted an review to the source code cha A change is merged to the target branch where it was submitted. -- Event Type: __`dev.cdevents.change.merged.0.1.2`__ +- Event Type: __`dev.cdevents.change.merged.0.2.0-draft`__ - Predicate: merged - Subject: [`change`](#change) @@ -195,7 +195,7 @@ A change is merged to the target branch where it was submitted. A tool or a user decides that the change has been inactive for a while and it can be considered abandoned. -- Event Type: __`dev.cdevents.change.abandoned.0.1.2`__ +- Event Type: __`dev.cdevents.change.abandoned.0.2.0-draft`__ - Predicate: abandoned - Subject: [`change`](#change) @@ -210,7 +210,7 @@ A tool or a user decides that the change has been inactive for a while and it ca A Change has been updated, for example a new commit is added or removed from an existing Change. -- Event Type: __`dev.cdevents.change.updated.0.1.2`__ +- Event Type: __`dev.cdevents.change.updated.0.2.0-draft`__ - Predicate: updated - Subject: [`change`](#change) diff --git a/spec.md b/spec.md index 6f554577..06641b31 100644 --- a/spec.md +++ b/spec.md @@ -267,6 +267,36 @@ defined in the [vocabulary](#vocabulary): - REQUIRED - MUST be a non-empty string +### OPTIONAL Context Attributes + +#### schemaUri + +- Type: [`URI`][typesystem] +- Description: link to a `jsonschema` schema that further refines the event schema + as defined by CDEvents. + + The schema provided by the `schemaUri` MUST be stricter than the CDEvents one, + and thus MUST NOT allow elements that would not be allowed by the CDEvents schema. + For example, the schema at `schemaUri` could define the content of `customData` + or restrict a `string` field to a specific `Enum`. + + Versioning of the schema provided in `schemaUri` is up to the maintainer, there + is no specific requirement from CDEvents side. + + Consumers of events that specify a `schemaUri` SHOULD validate the event against + the CDEvents schema as well as the additional schema provided. If the consumer + does not have access to the URI specified, it SHOULD fail to validate the event. + +- Constraints: + - OPTIONAL + - When specified, it MUST be a non-empty URI + - An absolute URI is REQUIRED + +- Examples: + + - If there is a single "context" (cloud, cluster or platform of some kind) + - `https://myorg.com/cdevents/schema/artifact-published-0-1-0` + ### Context example This is an example of a full CDEvent context, rendered in JSON format: @@ -278,7 +308,8 @@ This is an example of a full CDEvent context, rendered in JSON format: "id" : "A234-1234-1234", "source" : "/staging/tekton/", "type" : "dev.cdevents.taskrun.started", - "timestamp" : "2018-04-05T17:31:00Z" + "timestamp" : "2018-04-05T17:31:00Z", + "schemaUri": "https://myorg.com/cdevents/schema/taskrun-started-1-1-0" } } ``` diff --git a/testing-events.md b/testing-events.md index 00661908..6c4df79b 100644 --- a/testing-events.md +++ b/testing-events.md @@ -68,7 +68,7 @@ One or more `testOutput` artifacts are usually produced as the result of a test This event represents when a testCaseRun has been queued for execution - and is waiting for applicable preconditions (resource availability, other tasks, etc.) to be fulfilled before actually executing. -- Event Type: __`dev.cdevents.testcaserun.queued.0.1.0`__ +- Event Type: __`dev.cdevents.testcaserun.queued.0.2.0-draft`__ - Predicate: queued - Subject: [`testCaseRun`](#testcaserun) @@ -85,7 +85,7 @@ This event represents when a testCaseRun has been queued for execution - and is This event represents a started testCase execution. -- Event Type: __`dev.cdevents.testcaserun.started.0.1.0`__ +- Event Type: __`dev.cdevents.testcaserun.started.0.2.0-draft`__ - Predicate: started - Subject: [`testCaseRun`](#testcaserun) @@ -102,7 +102,7 @@ This event represents a started testCase execution. This event represents a finished testCase execution. The event will contain the outcome and additional metadata as applicable. -- Event Type: __`dev.cdevents.testcaserun.finished.0.1.0`__ +- Event Type: __`dev.cdevents.testcaserun.finished.0.2.0-draft`__ - Predicate: finished - Subject: [`testCaseRun`](#testcaserun) @@ -122,7 +122,7 @@ This event represents a finished testCase execution. The event will contain the This event represents when a testSuiteRun has been queued for execution - and is waiting for applicable preconditions (resource availability, other tasks, etc.) to be met before actually executing. -- Event Type: __`dev.cdevents.testsuiterun.queued.0.1.0`__ +- Event Type: __`dev.cdevents.testsuiterun.queued.0.2.0-draft`__ - Predicate: queued - Subject: [`testSuiteRun`](#testsuiterun) @@ -138,7 +138,7 @@ This event represents when a testSuiteRun has been queued for execution - and is This event represents a started testSuite execution. -- Event Type: __`dev.cdevents.testsuiterun.started.0.1.0`__ +- Event Type: __`dev.cdevents.testsuiterun.started.0.2.0-draft`__ - Predicate: started - Subject: [`testSuiteRun`](#testsuiterun) @@ -154,7 +154,7 @@ This event represents a started testSuite execution. This event represents a finished testSuite execution. The event will contain the outcome and additional metadata as applicable. -- Event Type: __`dev.cdevents.testsuiterun.finished.0.1.0`__ +- Event Type: __`dev.cdevents.testsuiterun.finished.0.2.0-draft`__ - Predicate: finished - Subject: [`testSuiteRun`](#testsuiterun) @@ -172,7 +172,7 @@ This event represents a finished testSuite execution. The event will contain the The event represents a test execution output that has been published. -- Event Type: __`dev.cdevents.testoutput.published.0.1.0`__ +- Event Type: __`dev.cdevents.testoutput.published.0.2.0-draft`__ - Predicate: published - Subject: [`testOutput`](#testoutput) diff --git a/tools/event-version.sh b/tools/event-version.sh index 52dc4d0f..d399e710 100755 --- a/tools/event-version.sh +++ b/tools/event-version.sh @@ -47,6 +47,18 @@ Examples: EOF } +function replace_example() { + # Replace the version in the example file + if [ -f "${EXAMPLE_FILE}" ]; then + sed -i ".backup" -e 's,"dev.cdevents.*","dev.cdevents.'${SUBJECT}'.'${PREDICATE}'.'${VERSION}'",g' "${EXAMPLE_FILE}" + fi +} + +function replace_schema() { + # Replace the version in the schema IDs + sed -i ".backup" -e 's,"dev.cdevents.*","dev.cdevents.'${SUBJECT}'.'${PREDICATE}'.'${VERSION}'",g' "${SCHEMA_FILE}" +} + set -o errexit set -o nounset set -o pipefail @@ -106,7 +118,7 @@ SPLIT_EVENT=(${EVENT_SUBJECT_PREDICATE//./ }) SUBJECT=${SPLIT_EVENT[0]} PREDICATE=${SPLIT_EVENT[1]} SCHEMA_FILE="schemas/${SUBJECT}${PREDICATE}.json" -EXAMPLE_FILE="examples/${SUBJECT}${PREDICATE}.json" +EXAMPLE_FILE="examples/${SUBJECT}_${PREDICATE}.json" # Evaluate the event version OLD_VERSION=$(sed -n -e '/"default": "dev.cdevents.'${SUBJECT}'.'${PREDICATE}'./s/.*\.\([0-9]\.[0-9]\.[0-9]\(-draft\)\{0,1\}\)"/\1/p' ${SCHEMA_FILE}) @@ -133,6 +145,11 @@ fi if [[ "${COMMAND}" == "${START_COMMAND}" ]]; then if [[ -n ${DRAFT_VERSION} ]]; then echo "Cannot start release ${VERSION}, already in ${DRAFT_VERSION}" + # Still ensure examples are up to date with OLD_VERSION + VERSION=${OLD_VERSION} + replace_example + # Cleanup backup files + find . -name '*.backup' | xargs rm exit 1 fi PATCH_VERSION=0 @@ -148,6 +165,10 @@ fi if [[ "${COMMAND}" == "${PATCH_COMMAND}" ]]; then if [[ -n ${DRAFT_VERSION} ]]; then echo "Cannot start release ${VERSION}, already in ${DRAFT_VERSION}" + VERSION=${OLD_VERSION} + replace_example + # Cleanup backup files + find . -name '*.backup' | xargs rm exit 1 fi PATCH_VERSION=$(( PATCH_VERSION + 1 )) @@ -155,13 +176,11 @@ fi VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${DRAFT_VERSION}" -# Replace the version in the schema IDs -sed -i ".backup" -e 's,"dev.cdevents.*","dev.cdevents.'${SUBJECT}'.'${PREDICATE}'.'${VERSION}'",g' "${SCHEMA_FILE}" +# Replace the version in the schema file +replace_schema # Replace the version in the example file -if [ -f "${EXAMPLE_FILE}" ]; then - sed -i ".backup" -e 's,"dev.cdevents.*","dev.cdevents.'${SUBJECT}'.'${PREDICATE}'.'${VERSION}'",g' "${EXAMPLE_FILE}" -fi +replace_example # Update examples in docs for doc in core source-code-version-control continuous-integration continuous-deployment continuous-operations testing-events; do