Skip to content

Commit

Permalink
Add support for CDEvents custom events
Browse files Browse the repository at this point in the history
As previously discussed in https://hackmd.io/LftfRirGRbKuAcLg9pdOag,
this introduces support for custom events:

- add a schemaURI (cdevents#184)
- add dev.cdeventsx types in spec.md
- add a custom folder which includes
  - README.md with context about custom events
  - registry.md to register external specs
  - schema.json - a common schema for custom events

Fixes: cdevents#168

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
  • Loading branch information
afrittoli committed Feb 22, 2024
1 parent ab73ef7 commit 939b18b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,29 @@ defined in the [vocabulary](#vocabulary):
- Type: [`String`][typesystem]
- Description: defines the type of event, as combination of a *subject*,
*predicate* and *version*. Valid event types are defined in the [vocabulary](#vocabulary).

All event types should be prefixed with `dev.cdevents.`. One occurrence may
have multiple events associated, as long as they have different event types.
*Versions* are semantic in the *major.minor.patch* format. For more details about versions
see the the see [versioning](https://cdevents.dev/docs/primer/#versioning) documentation.

In addition to `dev.cdevents.`, event types prefixed with `dev.cdeventsx.` can be defined in
specifications outside of CDEvents. Events that use these event types can be partly produced
and validated by CDEvents SDKs and are known a ["custom events"](custom/README.md).
External specifications can be registered in this repo in the
[custom events registry](custom/registry.md).

- Constraints:
- REQUIRED
- MUST be defined in the [vocabulary](#vocabulary)
- `dev.cdevents.` types MUST be defined in the [vocabulary](#vocabulary)
- `dev.cdeventsx.` types SHOULD be defined in a third party specification

- Examples:
- `dev.cdevents.taskrun.started`
- `dev.cdevents.environment.created`
- `dev.cdevents.<subject>.<predicate>`
- `dev.cdevents.mytool-process.finished`
- `dev.cdeventsx.<tool>-<subject>.<predicate>`

#### source (context)

Expand Down

0 comments on commit 939b18b

Please sign in to comment.