You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Improve subject fields spec and schema
Improve the spec of subject fields for all events:
- link id and source to their spec definitions
- add the type, linked to its spec definition
- include the value of the type for each event
Improve the jsonschema by constraining the subject
type field to the only valid value for each event.
Since all events have been patched already in
v0.2-draft, there's not need to +1 the version
number again within the same spec release.
Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
Copy file name to clipboardExpand all lines: continuous-deployment.md
+30-15Lines changed: 30 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,8 +27,9 @@ An `environment` is a platform which may run a `service`.
27
27
28
28
| Field | Type | Description | Examples |
29
29
|-------|------|-------------|----------|
30
-
| id |`String`| Uniquely identifies the subject within the source. |`1234`, `maven123`, `builds/taskrun123`|
31
-
| source |`URI-Reference`|[source](../spec.md#source) from the context |`staging/tekton`, `tekton-dev-123`|
30
+
| id |`String`| See [id](spec.md#id-subject)|`1234`, `maven123`, `builds/taskrun123`|
31
+
| source |`URI-Reference`| See [source](spec.md#source-subject)|`staging/tekton`, `tekton-dev-123`|
32
+
| type |`String`| See [type](spec.md#type-subject)|`environment`|
32
33
| name |`String`| Name of the environment |`dev`, `staging`, `production`, `ci-123`|
33
34
| url |`String`| URL to reference where the environment is located |`https://my-cluster.zone.my-cloud-provider`|
34
35
@@ -38,8 +39,9 @@ A `service` can represent for example a binary that is running, a daemon, an app
38
39
39
40
| Field | Type | Description | Examples |
40
41
|-------|------|-------------|----------|
41
-
| id |`String`| Uniquely identifies the subject within the source. |`service/myapp`, `daemonset/myapp`|
42
-
| source |`URI-Reference`|[source](../spec.md#source) from the context |`staging/tekton`, `tekton-dev-123`|
42
+
| id |`String`| See [id](spec.md#id-subject)|`service/myapp`, `daemonset/myapp`|
43
+
| source |`URI-Reference`| See [source](spec.md#source-subject)|`staging/tekton`, `tekton-dev-123`|
44
+
| type |`String`| See [type](spec.md#type-subject)|`service`|
43
45
| environment |`Object` ([`environment`](#environment)) | Reference for the environment where the service runs |`{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}`|
44
46
| artifactId |`Purl`| Identifier of the artifact deployed with this service |`pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c`|
45
47
@@ -55,8 +57,9 @@ This event represents an environment that has been created. Such an environment
55
57
56
58
| Field | Type | Description | Examples | Required |
| id |`String`| Uniquely identifies the subject within the source. |`service/myapp`, `daemonset/myapp`| ✅ |
107
+
| id |`String`| See [id](spec.md#id-subject)|`service/myapp`, `daemonset/myapp`| ✅ |
108
+
| source |`URI-Reference`| See [source](spec.md#source-subject)|||
109
+
| type |`String`| See [type](spec.md#type-subject)|`service`||
103
110
| environment |`Object` ([`environment`](#environment)) | Reference for the environment where the service runs |`{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}`| ✅ |
104
111
| artifactId |`Purl`| Identifier of the artifact deployed with this service |`0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl`| ✅ |
105
112
@@ -113,7 +120,9 @@ This event represents an existing instance of a service that has been upgraded t
113
120
114
121
| Field | Type | Description | Examples | Required |
| id |`String`| Uniquely identifies the subject within the source. |`service/myapp`, `daemonset/myapp`| ✅ |
123
+
| id |`String`| See [id](spec.md#id-subject)|`service/myapp`, `daemonset/myapp`| ✅ |
124
+
| source |`URI-Reference`| See [source](spec.md#source-subject)|||
125
+
| type |`String`| See [type](spec.md#type-subject)|`service`||
117
126
| environment |`Object` ([`environment`](#environment)) | Reference for the environment where the service runs |`{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}`| ✅ |
118
127
| artifactId |`Purl`| Identifier of the artifact deployed with this service |`pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c`| ✅ |
119
128
@@ -127,7 +136,9 @@ This event represents an existing instance of a service that has been rolled bac
127
136
128
137
| Field | Type | Description | Examples | Required |
| id |`String`| Uniquely identifies the subject within the source. |`service/myapp`, `daemonset/myapp`| ✅ |
139
+
| id |`String`| See [id](spec.md#id-subject)|`service/myapp`, `daemonset/myapp`| ✅ |
140
+
| source |`URI-Reference`| See [source](spec.md#source-subject)|||
141
+
| type |`String`| See [type](spec.md#type-subject)|`service`||
131
142
| environment |`Object` ([`environment`](#environment)) | Reference for the environment where the service runs |`{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}`| ✅ |
132
143
| artifactId |`Purl`| Identifier of the artifact deployed with this service |`pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c`| ✅ |
133
144
@@ -141,7 +152,9 @@ This event represents the removal of a previously deployed service instance and
141
152
142
153
| Field | Type | Description | Examples | Required |
| id |`String`| Uniquely identifies the subject within the source. |`service/myapp`, `daemonset/myapp`| ✅ |
155
+
| id |`String`| See [id](spec.md#id-subject)|`service/myapp`, `daemonset/myapp`| ✅ |
156
+
| source |`URI-Reference`| See [source](spec.md#source-subject)|||
157
+
| type |`String`| See [type](spec.md#type-subject)|`service`||
145
158
| environment |`Object` ([`environment`](#environment)) | Reference for the environment where the service runs |`{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}`| ✅ |
146
159
147
160
### `service published`
@@ -154,5 +167,7 @@ This event represents an existing instance of a service that has an accessible U
154
167
155
168
| Field | Type | Description | Examples | Required |
| id |`String`| Uniquely identifies the subject within the source. |`service/myapp`, `daemonset/myapp`| ✅ |
170
+
| id |`String`| See [id](spec.md#id-subject)|`service/myapp`, `daemonset/myapp`| ✅ |
171
+
| source |`URI-Reference`| See [source](spec.md#source-subject)|||
172
+
| type |`String`| See [type](spec.md#type-subject)|`service`||
158
173
| environment |`Object` ([`environment`](#environment)) | Reference for the environment where the service runs |`{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}`| ✅ |
0 commit comments