Skip to content

Commit

Permalink
fixup! Update links.md
Browse files Browse the repository at this point in the history
Signed-off-by: benjamin-j-powell <[email protected]>
  • Loading branch information
benjamin-j-powell committed Nov 28, 2023
1 parent a79673e commit 08b1db7
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
2 changes: 1 addition & 1 deletion links.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ further, we can allow for a path link between `pipelinerun.queued` to the
"from": {
"context_id": "271069a8-fc18-44f1-b38f-9d70a1695819" # context id of the pipelinerun.queued event
}
},
}
]
},
"subject": {
Expand Down
58 changes: 57 additions & 1 deletion spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ CDEvents is a common specification for Continuous Delivery events.
- [source (context)](#source-context)
- [timestamp](#timestamp)
- [version](#version)
- [OPTIONAL Context Attributes](#optional-context-attributes)
- [Context example](#context-example)
- [CDEvent subject](#cdevent-subject)
- [REQUIRED Subject Attributes](#required-subject-attributes)
Expand Down Expand Up @@ -262,6 +263,61 @@ defined in the [vocabulary](#vocabulary):
- REQUIRED
- MUST be a non-empty string

### OPTIONAL Context Attributes

#### chain_id

- Type: [`String`][typesystem]
- Description: Identifier for a chain as defined in the [links spec](links.md).

- Constraints:
- A [UUID version 4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random))

#### links

- Type: [`List`][typesystem]
- Description: A list of link objects as defined in the [links spec](links.md).

- Examples:
- A path link which is used to indicate a direct connection between two
events

```json
[
{
"link_type": "PATH",
"from": {
"context_id": "271069a8-fc18-44f1-b38f-9d70a1695819"
}
}
]
```
- A relation link where the `context_id` is was some trigger for this event

```json
[
{
"link_type": "RELATION",
"link_kind": "TRIGGER",
"target": {
"context_id": "5328c37f-bb7e-4bb7-84ea-9f5f85e4a7ce"
}
}
]
```
- An end link signaling the end of a chain

```json
[
{
"link_type": "PATH",
"from": {
"context_id": "271069a8-fc18-44f1-b38f-9d70a1695819"
}
}
]
```

### Context example

This is an example of a full CDEvent context, rendered in JSON format:
Expand Down Expand Up @@ -516,4 +572,4 @@ platforms.
[typesystem]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type-system
[datacontenttype]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#datacontenttype
[rfc2406]: https://tools.ietf.org/html/rfc2046
[purl-spec]: https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst
[purl-spec]: https://github.com/package-url/purl-spec/blob/master/PURL-SPECIFICATION.rst

0 comments on commit 08b1db7

Please sign in to comment.