Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move examples to conformance #225

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .spellcheck-en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SRE
Tekton
URI
UUID
YAML
american
assignees
br
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ Handling Events associated with Test execution performed independently or as par

Defining how CDEvents are mapped to CloudEvents for transportation and delivery

### [Schemas](./schemas/) and [Examples](./examples/)
### [Schemas](./schemas/) and [Conformance](./conformance/)

The [schemas](./schemas/) folder contains `jsonschemas` for all events in the spec. The [examples](./examples/) contains simple `JSON` examples for all events.
The [schemas](./schemas/) folder contains `jsonschemas` for all events in the spec. The [conformance](./conformance/) folder contains simple `JSON` examples for all events. The content of the conformance folder is used for testing purposes: the structure of the files in there is sound, the values have correct types but are not particularly meaningful.

## CDEvents SDKs

Expand Down
4 changes: 4 additions & 0 deletions conformance/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Conformance Files

All the YAML example files in this folder are used for validation testing of the specification as well as for conformance testing of the SDKs.
The structures are values are valid and up-to-date with the specification. The values do not bear special meaning though and should not be used as a reference when producing or consuming CDEvents.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 8 additions & 8 deletions continuous-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ A `service` can represent for example a binary that is running, a daemon, an app

## Events

### [`environment created`](examples/environment_created.json)
### [`environment created`](conformance/environment_created.json)

This event represents an environment that has been created. Such an environment can be used to deploy services in.

Expand All @@ -63,7 +63,7 @@ This event represents an environment that has been created. Such an environment
| name | `String` | Name of the environment | `dev`, `staging`, `production`, `ci-123`| |
| url | `String` | URL to reference where the environment is located | `https://my-cluster.zone.my-cloud-provider`| |

### [`environment modified`](examples/environment_modified.json)
### [`environment modified`](conformance/environment_modified.json)

This event represents an environment that has been modified.

Expand All @@ -79,7 +79,7 @@ This event represents an environment that has been modified.
| name | `String` | Name of the environment | `dev`, `staging`, `production`, `ci-123`| |
| url | `String` | URL to reference where the environment is located | `https://my-cluster.zone.my-cloud-provider`| |

### [`environment deleted`](examples/environment_deleted.json)
### [`environment deleted`](conformance/environment_deleted.json)

This event represents an environment that has been deleted.```

Expand All @@ -94,7 +94,7 @@ This event represents an environment that has been deleted.```
| type | `String` | See [type](spec.md#type-subject) | `environment` | |
| name | `String` | Name of the environment | `dev`, `staging`, `production`, `ci-123`| |

### [`service deployed`](examples/service_deployed.json)
### [`service deployed`](conformance/service_deployed.json)

This event represents a new instance of a service that has been deployed

Expand All @@ -110,7 +110,7 @@ This event represents a new instance of a service that has been deployed
| environment | `Object` ([`environment`](#environment)) | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | ✅ |
| artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | ✅ |

### [`service upgraded`](examples/service_upgraded.json)
### [`service upgraded`](conformance/service_upgraded.json)

This event represents an existing instance of a service that has been upgraded to a new version

Expand All @@ -126,7 +126,7 @@ This event represents an existing instance of a service that has been upgraded t
| environment | `Object` ([`environment`](#environment)) | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | ✅ |
| artifactId | `Purl` | Identifier of the artifact deployed with this service |`pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | ✅ |

### [`service rolledback`](examples/service_rolledback.json)
### [`service rolledback`](conformance/service_rolledback.json)

This event represents an existing instance of a service that has been rolled back to a previous version

Expand All @@ -142,7 +142,7 @@ This event represents an existing instance of a service that has been rolled bac
| environment | `Object` ([`environment`](#environment)) | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | ✅ |
| artifactId | `Purl` | Identifier of the artifact deployed with this service | `pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | ✅ |

### [`service removed`](examples/service_removed.json)
### [`service removed`](conformance/service_removed.json)

This event represents the removal of a previously deployed service instance and is thus not longer present in the specified environment

Expand All @@ -157,7 +157,7 @@ This event represents the removal of a previously deployed service instance and
| type | `String` | See [type](spec.md#type-subject) | `service` | |
| environment | `Object` ([`environment`](#environment)) | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | ✅ |

### [`service published`](examples/service_published.json)
### [`service published`](conformance/service_published.json)

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.

Expand Down
16 changes: 8 additions & 8 deletions continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ An `artifact` is usually produced as output of a build process. Events need to b

## Events

### [`build queued`](examples/build_queued.json)
### [`build queued`](conformance/build_queued.json)

This event represents a Build task that has been queued; this build process usually is in charge of producing a binary from source code.

Expand All @@ -66,7 +66,7 @@ This event represents a Build task that has been queued; this build process usua
| source | `URI-Reference` | See [source](spec.md#source-subject) | | |
| type | `String` | See [type](spec.md#type-subject) | `build` | |

### [`build started`](examples/build_started.json)
### [`build started`](conformance/build_started.json)

This event represents a Build task that has been started; this build process usually is in charge of producing a binary from source code.

Expand All @@ -80,7 +80,7 @@ This event represents a Build task that has been started; this build process usu
| source | `URI-Reference` | See [source](spec.md#source-subject) | | |
| type | `String` | See [type](spec.md#type-subject) | `build` | |

### [`build finished`](examples/build_finished.json)
### [`build finished`](conformance/build_finished.json)

This event represents a Build task that has finished. This event will eventually contain the finished status, success, error or failure

Expand All @@ -95,7 +95,7 @@ This event represents a Build task that has finished. This event will eventually
| type | `String` | See [type](spec.md#type-subject) | |
| artifactId | `Purl` | Identifier of the artifact produced by the build | `pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | `build` | |

### [`artifact packaged`](examples/artifact_packaged.json)
### [`artifact packaged`](conformance/artifact_packaged.json)

The event represents an artifact that has been packaged for distribution; this artifact is now versioned with a fixed version.
This event is usually produced by the build system. If an SBOM URI is available at this stage, it should be included.
Expand All @@ -112,7 +112,7 @@ This event is usually produced by the build system. If an SBOM URI is available
| change | `object` | The change (tag, commit, revision) of the repository which was used to build the artifact" | `{"id": "527d4a1aca5e8d0df24813df5ad65d049fc8d312", "source": "my-git.example/an-org/a-repo"}`, `{"id": "feature1234", "source": "my-git.example/an-org/a-repo"}` | ✅ |
| sbom | [`sbom`](#sbom) | The Software Bill of Material (SBOM) associated with the artifact | `{"uri": "https://sbom.storage.service/my-projects/3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427.sbom"}` | |

### [`artifact signed`](examples/artifact_signed.json)
### [`artifact signed`](conformance/artifact_signed.json)

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.
Expand All @@ -128,7 +128,7 @@ An artifact may be signed after it has been packaged or sometimes after it has p
| type | `String` | See [type](spec.md#type-subject) | `artifact` | |
| signature | `string` | The signature of the artifact | `MEYCIQCBT8U5ypDXWCjlNKfzTV4KH516/SK13NZSh8znnSMNkQIhAJ3XiQlc9PM1KyjITcZXHotdMB+J3NGua5T/yshmiPmp` | ✅ |

### [`artifact published`](examples/artifact_published.json)
### [`artifact published`](conformance/artifact_published.json)

The event represents an artifact that has been published and it can be advertised for others to use.
The `artifact published` event is typically produced by the artifact registry, but it may also be produced by the build system.
Expand All @@ -144,7 +144,7 @@ The `artifact published` event is typically produced by the artifact registry, b
| type | `String` | See [type](spec.md#type-subject) | `artifact` | |
| user | `String` | The user who published to the artifact registry. [^user] | `mybot-myapp` | |

### [`artifact downloaded`](examples/artifact_downloaded.json)
### [`artifact downloaded`](conformance/artifact_downloaded.json)

The event represents an artifact that has been downloaded from the registry.
The `artifact downloaded` event is preferably produced by the artifact registry.
Expand All @@ -160,7 +160,7 @@ The `artifact downloaded` event is preferably produced by the artifact registry.
| type | `String` | See [type](spec.md#type-subject) | `artifact` | |
| user | `String` | The user who downloaded from the artifact registry. [^user] | `mybot-myapp` | |

### [`artifact deleted`](examples/artifact_deleted.json)
### [`artifact deleted`](conformance/artifact_deleted.json)

The event represents an artifact that has been deleted from an artifact registry.
The `artifact deleted` event is preferably produced by the artifact registry.
Expand Down
12 changes: 6 additions & 6 deletions continuous-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ A ticket can request a change, report a problem, or document an [`incident`](#in

## Events

### [`incident detected`](examples/incident_detected.json)
### [`incident detected`](conformance/incident_detected.json)

This event represents an incident that has been detected by a system or human.

Expand All @@ -76,7 +76,7 @@ This event represents an incident that has been detected by a system or human.
| service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | |
| artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | |

### [`incident reported`](examples/incident_reported.json)
### [`incident reported`](conformance/incident_reported.json)

This event represents an incident that has been reported through a ticketing system. Compared to the `detected` predicated, it introduces a ticket URI.

Expand All @@ -95,7 +95,7 @@ This event represents an incident that has been reported through a ticketing sys
| service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | |
| artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | |

### [`incident resolved`](examples/incident_resolved.json)
### [`incident resolved`](conformance/incident_resolved.json)

This event represents an incident that has been resolved, meaning that the problem identified by the incident has been solved or recalled.

Expand All @@ -113,7 +113,7 @@ This event represents an incident that has been resolved, meaning that the probl
| service | `Object` ([`service`](./continuous-deployment.md#service)) | Reference to the service | `{"id": "service123"}`, `{"id": "service123", "source": "region1/k8s/namespace"}` | |
| artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | |

### [`ticket created`](examples/ticket_created.json)
### [`ticket created`](conformance/ticket_created.json)

This event represents a ticket that has been created within some ticketing system.

Expand All @@ -136,7 +136,7 @@ This event represents a ticket that has been created within some ticketing syste
| milestone | `String` | An ID that represents a goal for when this ticket is to be completed | `123`, `sprint-123`, `Q1` | |
| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` | ✅ |

### [`ticket updated`](examples/ticket_updated.json)
### [`ticket updated`](conformance/ticket_updated.json)

This event indicates that a ticket has been updated within some ticketing system.

Expand All @@ -160,7 +160,7 @@ This event indicates that a ticket has been updated within some ticketing system
| uri | `URI-Reference` | A link to the ticket itself | `https://example.issues.com/ticket123` | ✅ |
| updatedBy | `String` | The person who authored the updates | `Bob` | |

### [`ticket closed`](examples/ticket_closed.json)
### [`ticket closed`](conformance/ticket_closed.json)

This event indicates that a ticket has been closed or resolved within some ticketing system.

Expand Down
10 changes: 5 additions & 5 deletions core.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ associated, in which case it is acceptable to generate only taskRun events.

## Events

### [`pipelineRun queued`](examples/pipelinerun_queued.json)
### [`pipelineRun queued`](conformance/pipelinerun_queued.json)

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
Expand All @@ -80,7 +80,7 @@ to ignore these events if they don't apply to their use cases.
| pipelineName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | |
| url | `URI` | url to the `pipelineRun` | `https://dashboard.org/namespace/pipelinerun-1234`, `https://api.cdsystem.com/namespace/pipelinerun-1234` | |

### [`pipelineRun Started`](examples/pipelinerun_started.json)
### [`pipelineRun Started`](conformance/pipelinerun_started.json)

A pipelineRun has started and it is running.

Expand All @@ -96,7 +96,7 @@ A pipelineRun has started and it is running.
| pipelineName | `String` | The name of the pipeline | `MyPipeline`, `Unit tests for my repo` | |
| url | `URI` | url to the `pipelineRun` | `https://dashboard.org/namespace/pipelinerun-1234`, `https://api.cdsystem.com/namespace/pipelinerun-1234` | |

### [`pipelineRun Finished`](examples/pipelinerun_finished.json)
### [`pipelineRun Finished`](conformance/pipelinerun_finished.json)

A pipelineRun has finished, successfully or not.

Expand All @@ -114,7 +114,7 @@ A pipelineRun has finished, successfully or not.
| outcome | `String (enum)` | outcome of a finished `pipelineRun` | `success`, `error` or `failure`| |
| errors | `String` | In case of error or failed pipeline, provides details about the failure | `Invalid input param 123`, `Timeout during execution`, `pipelineRun canceled by user`, `Unit tests failed`| |

### [`taskRun Started`](examples/taskrun_started.json)
### [`taskRun Started`](conformance/taskrun_started.json)

A taskRun has started and it is running.

Expand All @@ -131,7 +131,7 @@ A taskRun has started and it is running.
| pipelineRun | `Object` ([`pipelineRun`](#pipelinerun)) | The `pipelineRun` that this `taskRun` belongs to. | `{"id": "namespace/pipelinerun-1234"}`| |
| url | `URI` | url to the `taskRun` | `https://dashboard.org/namespace/taskrun-1234`, `https://api.cdsystem.com/namespace/taskrun-1234` | |

### [`taskRun Finished`](examples/taskrun_finished.json)
### [`taskRun Finished`](conformance/taskrun_finished.json)

A taskRun has finished, successfully or not.

Expand Down
Loading
Loading