-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move artifact events to their own file
This commit contains no functional change to the spec. It moves artifact events to their own file (similar to what we did for testing events), in preparation for further artifact events being added. Cleaned up some wrong references, left over when moving test events, added both testing and artifact events to spec.md too. Partially-fixes: #143 Signed-off-by: Andrea Frittoli <[email protected]>
- Loading branch information
Showing
3 changed files
with
92 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<!-- | ||
--- | ||
linkTitle: "Artifact Events" | ||
weight: 55 | ||
hide_summary: true | ||
icon: "fa-solid fa-box" | ||
description: > | ||
Artifact Events | ||
--- | ||
--> | ||
# Artifact Events | ||
|
||
Artifact events include the subject and predicates related software artifacts, and are usually produced by build systems and artifact registries. | ||
|
||
## Subjects | ||
|
||
This specification defines one subjects in this stage: `artifacts`. Events associated with these subjects are typically generated either by a CI system that orchestrates the process or by a specific build or test tool directly. Some artifact events may be generated by the system that stores the artifact as well. | ||
|
||
| Subject | Description | Predicates | | ||
|---------|-------------|------------| | ||
| [`artifact`](#artifact) | An artifact produced by a build | [`packaged`](#artifact-packaged), [`published`](#artifact-published), [`signed`](#artifact-signed)| | ||
|
||
### `artifact` | ||
|
||
An `artifact` is usually produced as output of a build process. Events need to be generated to indicate that an `artifact` has been packaged and released for others to use. These events can be produced by the artifact producer or by the artifact storage system. | ||
|
||
| Field | Type | Description | Examples | | ||
|-------|------|-------------|----------| | ||
| id | `String` | See [id](spec.md#id-subject)| `pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | | ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | `staging/tekton`, `tekton-dev-123`| | ||
| type | `String` | See [type](spec.md#type-subject) | `artifact` | | ||
| 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"}` | | ||
| signature | `string` | The signature of the artifact | `MEYCIQCBT8U5ypDXWCjlNKfzTV4KH516/SK13NZSh8znnSMNkQIhAJ3XiQlc9PM1KyjITcZXHotdMB+J3NGua5T/yshmiPmp` | | ||
|
||
## Events | ||
|
||
### [`artifact packaged`](examples/artifact_packaged.json) | ||
|
||
The event represents an artifact that has been packaged for distribution; this artifact is now versioned with a fixed version. | ||
|
||
- Event Type: __`dev.cdevents.artifact.packaged.0.1.1`__ | ||
- Predicate: packaged | ||
- Subject: [`artifact`](#artifact) | ||
|
||
| Field | Type | Description | Examples | Required | | ||
|-------|------|-------------|----------|----------------------------| | ||
| id | `Purl` | See [id](spec.md#id-subject) | `pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | ✅ | | ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | | | | ||
| type | `String` | See [type](spec.md#type-subject) | `artifact` | | | ||
| 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"}` | ✅ | | ||
|
||
### [`artifact published`](examples/artifact_published.json) | ||
|
||
The event represents an artifact that has been published and it can be advertised for others to use. | ||
|
||
- Event Type: __`dev.cdevents.artifact.published.0.1.1`__ | ||
- Predicate: published | ||
- Subject: [`artifact`](#artifact) | ||
|
||
| Field | Type | Description | Examples | Required | | ||
|-------|------|-------------|----------|----------------------------| | ||
| id | `Purl` | See [id](spec.md#id-subject) | `pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427?repository_url=mycr.io/myapp`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | ✅ | | ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | | | | ||
| type | `String` | See [type](spec.md#type-subject) | `artifact` | | | ||
|
||
### [`artifact signed`](examples/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. | ||
|
||
- Event Type: __`dev.cdevents.artifact.signed.0.1.0`__ | ||
- Predicate: signed | ||
- Subject: [`artifact`](#artifact) | ||
|
||
| Field | Type | Description | Examples | Required | | ||
|-------|------|-------------|----------|----------------------------| | ||
| id | `Purl` | See [id](spec.md#id-subject) | `pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427?repository_url=mycr.io/myapp`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | ✅ | | ||
| source | `URI-Reference` | See [source](spec.md#source-subject) | | | | ||
| type | `String` | See [type](spec.md#type-subject) | `artifact` | | | ||
| signature | `string` | The signature of the artifact | `MEYCIQCBT8U5ypDXWCjlNKfzTV4KH516/SK13NZSh8znnSMNkQIhAJ3XiQlc9PM1KyjITcZXHotdMB+J3NGua5T/yshmiPmp` | ✅ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters