Project: CDEvents (App Definition and Development / Streaming & Messaging)
File: continuous-deployment.md

<!-- linkTitle: "Continuous Deployment Events" weight: 60 hide_summary: true icon: "fa-solid fa-satellite-dish" description: > Continuous Deployment Events --> Continuous Deployment (CD) events are related to continuous deployment pipelines and their target environments. These events can be emitted by environments to report where software artifacts such as services, binaries, daemons, jobs or embedded software are running. This specification defines two subjects in this stage: `environment` and `service`. The term `service` is used to represent a running Artifact. A `service` can represent a binary that is running, a daemon, an application, a docker container. The term `environment` represent any platform which has all the means to run a `service`. | Subject | Description | Predicates | ||-|| | | An environment where to run services | , , | | | A service | , , , , | An `environment` is a platform which may run a `service`. | Field | Type | Description | Examples | |-||-|-| | id | `String` | See | `1234`, `maven123`, `builds/taskrun123` | | source | `URI-Reference` | See | `staging/tekton`, `tekton-dev-123`| | type | `String` | See | `environment` | | name | `String` | Name of the environment | `dev`, `staging`, `production`, `ci-123`| | url | `String` | URL to reference where the environment is located | `https://my-cluster.zone.my-cloud-provider`| A `service` can represent for example a binary that is running, a daemon, an application or a docker container. | Field | Type | Description | Examples | |-||-|-| | id | `String` | See | `service/myapp`, `daemonset/myapp` | | source | `URI-Reference` | See | `staging/tekton`, `tekton-dev-123`| | type | `String` | See | `service` | | environment | `Object` () | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | | artifactId | `Purl` | Identifier of the artifact deployed with this service | `pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | This event represents an environment that has been created. Such an environment can be used to deploy services in. Event Type: `dev.cdevents.environment.created.0.3.0-draft` Predicate: created Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/pipelinerun-1234` | | | source | `URI-Reference` | See | | | | type | `String` | See | `environment` | | | name | `String` | Name of the environment | `dev`, `staging`, `production`, `ci-123`| | | url | `String` | URL to reference where the environment is located | `https://my-cluster.zone.my-cloud-provider`| | This event represents an environment that has been modified. Event Type: `dev.cdevents.environment.modified.0.3.0-draft` Predicate: modified Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/pipelinerun-1234` | | | source | `URI-Reference` | See | | | | type | `String` | See | `environment` | | | name | `String` | Name of the environment | `dev`, `staging`, `production`, `ci-123`| | | url | `String` | URL to reference where the environment is located | `https://my-cluster.zone.my-cloud-provider`| | This event represents an environment that has been deleted.``` Event Type:

Predicate: deleted Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `tenant1/12345-abcde`, `namespace/pipelinerun-1234` | | | source | `URI-Reference` | See | | | | type | `String` | See | `environment` | | | name | `String` | Name of the environment | `dev`, `staging`, `production`, `ci-123`| | This event represents a new instance of a service that has been deployed Event Type: `dev.cdevents.service.deployed.0.3.0-draft` Predicate: deployed Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `service/myapp`, `daemonset/myapp` | | | source | `URI-Reference` | See | | | | type | `String` | See | `service` | | | environment | `Object` () | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | | | artifactId | `Purl` | Identifier of the artifact deployed with this service | `0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `927aa808433d17e315a258b98e2f1a55f8258e0cb782ccb76280646d0dbe17b5`, `six-1.14.0-py2.py3-none-any.whl` | | This event represents an existing instance of a service that has been upgraded to a new version Event Type: `dev.cdevents.service.upgraded.0.3.0-draft` Predicate: upgraded Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `service/myapp`, `daemonset/myapp` | | | source | `URI-Reference` | See | | | | type | `String` | See | `service` | | | environment | `Object` () | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | | | artifactId | `Purl` | Identifier of the artifact deployed with this service |`pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | | This event represents an existing instance of a service that has been rolled back to a previous version Event Type: `dev.cdevents.service.rolledback.0.3.0-draft` Predicate: rolledback Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `service/myapp`, `daemonset/myapp` | | | source | `URI-Reference` | See | | | | type | `String` | See | `service` | | | environment | `Object` () | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | | | artifactId | `Purl` | Identifier of the artifact deployed with this service | `pkg:oci/myapp@sha256%3A0b31b1c02ff458ad9b7b81cbdf8f028bd54699fa151f221d1e8de6817db93427`, `pkg:golang/mygit.com/myorg/myapp@234fd47e07d1004f0aed9c` | | This event represents the removal of a previously deployed service instance and is thus not longer present in the specified environment Event Type: `dev.cdevents.service.removed.0.3.0-draft` Predicate: removed Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `service/myapp`, `daemonset/myapp` | | | source | `URI-Reference` | See | | | | type | `String` | See | `service` | | | environment | `Object` () | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | | This event represents an existing instance of a service that has an accessible URL for users to interact with it. This event can be used to let other tools know that the service is ready and also available for consumption. Event Type: `dev.cdevents.service.published.0.3.0-draft` Predicate: published Subject: | Field | Type | Description | Examples | Required | |-||-|-|-| | id | `String` | See | `service/myapp`, `daemonset/myapp` | | | source | `URI-Reference` | See | | | | type | `String` | See | `service` | | | environment | `Object` () | Reference for the environment where the service runs | `{"id": "1234"}`, `{"id": "maven123, "source": "tekton-dev-123"}` | |