diff --git a/continuous-integration.md b/continuous-integration.md index 34daf71c..cab4c5ba 100644 --- a/continuous-integration.md +++ b/continuous-integration.md @@ -80,7 +80,7 @@ This event represents a Build task that has been started; this build process usu ### [`build finished`](examples/build_finished.json) -This event represents a Build task that has finished. This event will eventually contain the finished status, success, error or failure +This event represents a Build task that has finished and will contain the outcome of the given build. - Event Type: __`dev.cdevents.build.finished.0.1.1`__ - Predicate: finished @@ -92,6 +92,7 @@ This event represents a Build task that has finished. This event will eventually | source | `URI-Reference` | See [source](spec.md#source-subject) | | | | 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` | | +| outcome | `String` | Represents the finished state of a build. | `succeeded`, `failed`, `cancelled` | | ### [`artifact packaged`](examples/artifact_packaged.json) diff --git a/examples/build_finished.json b/examples/build_finished.json index 72db1245..d78050eb 100644 --- a/examples/build_finished.json +++ b/examples/build_finished.json @@ -11,7 +11,8 @@ "source": "/event/source/123", "type": "build", "content": { - "artifactId": "pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427" + "artifactId": "pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427", + "outcome": "succeeded" } } } diff --git a/schemas/buildfinished.json b/schemas/buildfinished.json index e84ac9c4..6dd5cb43 100644 --- a/schemas/buildfinished.json +++ b/schemas/buildfinished.json @@ -20,9 +20,9 @@ "type": { "type": "string", "enum": [ - "dev.cdevents.build.finished.0.1.1" + "dev.cdevents.build.finished.0.1.2" ], - "default": "dev.cdevents.build.finished.0.1.1" + "default": "dev.cdevents.build.finished.0.1.2" }, "timestamp": { "type": "string", @@ -62,6 +62,15 @@ "properties": { "artifactId": { "type": "string" + }, + "outcome": { + "type": "string", + "minLength": 1, + "enum": [ + "succeeded", + "failed", + "cancelled" + ] } }, "additionalProperties": false, @@ -97,4 +106,4 @@ "context", "subject" ] -} \ No newline at end of file +}