Skip to content

Commit 985cb85

Browse files
committed
Import draft spec
Signed-off-by: Andrea Frittoli <[email protected]>
1 parent c47ecff commit 985cb85

File tree

6 files changed

+161
-0
lines changed

6 files changed

+161
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# IDE
2+
.idea/
3+
.vscode/
4+
5+
# Mac
6+
.DS_Store
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Continuous Deployment Pipelines Events
2+
3+
__Note:__ This is a work-in-progress draft version and is being worked on by members of the Events SIG. You are very welcome to join the work and the discussions!
4+
5+
These events are related to continuos deployment pipelines and their target environments.
6+
These events can be emitted by environments to report where software artifacts such as services, binaries, daemons, jobs or embedded software are running.
7+
8+
The term Service is used to represent a running Artifact. This service can represent a binary that is running, a daemon, an application, a docker container, etc.
9+
The term Environment represent any platform which has all the means to run a Service.
10+
11+
- **Environment Created**: an environment has been created and it can be used to deploy Services
12+
- **Environment Modified**: an environment has been modified, this event advertise the changes made in the environment
13+
- **Environment Deleted**: an environment has been deleted and cannot longer be used
14+
- **Service Deployed**: a new instance of the Service has been deployed
15+
- **Service Upgraded**: an existing instance of a Service has been upgraded to a new version
16+
- **Service Rolledback**: an existing instance of a Service has been rolledback to a previous version
17+
- **Service Removed**: an existing instance of a Service has been terminated an it is not longer present in an environment
18+
19+
Continuous Deployment Events MUST include the following attributes:
20+
21+
- **Event Type**: the type is restricted to include `cd.**` prefix. For example `cd.service.upgraded` or `cd.environment.created`
22+
- **Environment ID**: unique identifier for the Environment
23+
24+
Optional attributes:
25+
26+
- **Environment Name**: user-friendly name for the environment, to be displayed in tools or User Interfaces
27+
- **Environment URL**: URL to reference where the environment is located
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Continuous Integration Events
2+
3+
__Note:__ This is a work-in-progress draft version and is being worked on by members of the Events SIG. You are very welcome to join the work and the discussions!
4+
5+
These events are related to **Continuous Integration(CI)** activities. CI usually include activities such as building, testing, packaging and releasing software artifacts.
6+
7+
The following events represent concrete Tasks that are associated with the execution of CI pipelines:
8+
9+
- **Build Queued**: a Build task has been queued, this build process usually is in charge of producing a binary from source code
10+
- **Build Started**: a Build task has started
11+
- **Build Finished**: a Build task has finished, the event will contain the finished status, success, error or failure
12+
13+
The following Test events are defined in two separate categories **Test Case** and **Test Suite**. A **Test Case** is the smallest unit of testing that the user wants to track. A **Test Suite** is a collection of test case executions and/or other test suite executions. **Test Cases** executed, and Test Suites are for grouping purposes. For this reason, **Test Cases** can be queued.
14+
15+
- **Test Case Queued**: a Test task has been queued, and it is waiting to be started
16+
- **Test Case Started**: a Test task has started
17+
- **Test Case Finished**: a Test task has finished, the event will contain the finished status: success, error or failure
18+
- **Test Suite Started**: a Test Suite has started
19+
- **Test Suite Finished**: a Test Suite has finished, the event will contain the finished status: success, error or failure
20+
21+
Finally, events needs to be generated for the output of the pipeline such as the artifacts that were packaged and released for others to use.
22+
23+
- **Artifact Packaged**: an artifact has been packaged for distribution, this artifact is now versioned with a fixed version
24+
- **Artifact Published**: an artifact has been published and it can be advertised for others to use
25+
26+
CI Events MUST include the following attributes:
27+
28+
- **Event Type**: the type is restricted to include `cd.**` prefix. For example `cd.build.queued` or `cd.artifact.packaged`
29+
30+
Optional attributes:
31+
32+
- **Artifact Id**: the unique identifier of the artifact that the event is referring to.

core.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Continuous Delivery Core Events
2+
3+
__Note:__ This is a work-in-progress draft version and is being worked on by members of the Events SIG. You are very welcome to join the work and the discussions!
4+
5+
Continuous Delivery related to activities and orchestration that needs to exist to be able to deterministically and continuously being able to delivery software to users.
6+
7+
A pipeline, in the context of Continuous Delivery, is the definition of a set of tasks that needs to be performed to build, test, package, release and deploy software artifacts. A pipeline can be instanciated multiple times, for example to build different versions of the same artifact. We are referring to this instance as PipelineRun. It will have a unique Id and it will help us to track the build and release progress on a particular software artifact.
8+
9+
Due the dynamic nature of Pipelines, most of actual work needs to be queued to happen in a distributed way, hence Queued events are added. Adopters can choose to ignore these events if they don't apply to their use cases.
10+
11+
- **PipelineRun Queued**: a PipelineRun has been schedule to run
12+
- **PipelineRun Started**: a PipelineRun has started and it is running
13+
- **PipelineRun Finished**: a PipelineRun has finished it execution, the event will contain the finished status, success, error or failure
14+
15+
Each pipeline is defined as a set of Tasks to be performed in sequence, hence tracking this sequence might be important for some cases. A TaskRun is an instance of the Task defined inside the pipeline, as you can expect multiple execution of the pipelines (each a PipelineRun) you can also expect multiple execution of the Tasks, for that reason we use TaskRun to refer to one of these instances.
16+
17+
- **TaskRun Started**: a TaskRun inside a PipelineRun has started.
18+
- **TaskRun Finished**: a TaskRun inside a PipelineRun has finished.
19+
20+
Pipeline Events MUST include the following attributes:
21+
22+
- **Event Type**: the type is restricted to include `cd.**` prefix. For example `cd.pipelinerun.queued` or `cd.tests.started`
23+
- **PipelineRun Id**: unique identifier for a pipeline execution
24+
- **Pipeline Name**: unique identifier for the pipeline, not for the instance. A pipeline can have multiple instances/runs.
25+
- **PipelineRun Status**: current status of the PipelineRun at the time when the event was emitted. If the pipeline is finished, this attribute should reflect if it finished successfully or if there was an error on the execution. Possible statuses: [Running, Finished, Error]
26+
27+
Optional attributes:
28+
29+
- **PipelineRun URL**: URL to locate where pipeline instances are running
30+
- **PipelineRun Errors**: error field to indicate possible compilation, test, build and package errors.

source-code-version-control.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Source Code Version Control Events
2+
3+
__Note:__ This is a work-in-progress draft version and is being worked on by members of the Events SIG. You are very welcome to join the work and the discussions!
4+
5+
This phase includes events related to changes in Source Code repositories that are relevant from a Continuous Delivery perspective.
6+
7+
## Repository Events
8+
9+
These events are related to Source Code repositories
10+
11+
- **Repository Created Event**: a new Source Code Repository was created to host source code for a project
12+
- **Repository Modified Event**: a Source Code Repository modified some of its attributes, like location, or owner
13+
- **Repository Deleted Event**: a Source Code Repository was deleted and it is not longer available
14+
- **Branch Created Event**: a Branch inside the Repository was created
15+
- **Branch Deleted Event**: a Branch inside the Repository was deleted
16+
17+
Repository Events MUST include the following attributes:
18+
19+
- **Event Type**: the type is restricted to include `cd.**` prefix. For example `cd.repository.created` or `cd.repository.changeapproved`
20+
- **Repository URL**: indicates the location of the source code repository for API operations, this URL needs to include the protocol used to connect to the repository. For example `git://` , `ssh://`, `https://`
21+
- **Repository Name**: friendly name to list this repository to users
22+
23+
Optional attributes:
24+
25+
- **Repository Owner**: indicates who is the owner of the repository, usually a `user` or an `organization`
26+
- **Repository View URL**: URL to access the repository from a user web browser
27+
28+
From each repository you can emit events related with proposed source code changes. Each change can include a single or multiple commits that can also be tracked.
29+
30+
- **Change Created Event**: a source code change was created and submitted to a repository specific branch. Examples: PullRequest sent to Github, MergeRequest sent to Gitlab, Change created in Gerrit
31+
- **Change Reviewed Event**: someone (user) or an automated system submitted an review to the source code change. A user or an automated system needs to be in charge of understanding how many approvals/rejections are needed for this change to be merged or rejected. The review event needs to include if the change is approved by the reviewer, more changes are needed or if the change is rejected.
32+
- **Change Merged Event**: the change is merged to the target branch where it was submitted.
33+
- **Change Abandoned Event**: a tool or a user decides that the change has been inactive for a while and it can be considered abandoned.
34+
- **Change Updated**: the Change has been updated, for example a new commit is added or removed from an existing Change
35+
36+
Optional attributes for **Change** Events:
37+
38+
- (TBD)

spec.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Continuous Delivery Events Vocabulary
2+
3+
__Note:__ This is a work-in-progress draft version and is being worked on by members of the Events SIG. You are very welcome to join the work and the discussions!
4+
5+
This document intends to describe a set of events related to different phases of a Continuous Delivery process.
6+
These events are categorized by meaning, and the phase where they are intended to be used.
7+
These events are agnostic from any specific tool and are designed to fit a wide range of scenarios.
8+
9+
The phases covered by this proposal are:
10+
11+
- **[Core Events](core.md)**: includes core events related to core activities and orchestration that needs to exist to be able to deterministically and continously being able to delivery software to users.
12+
- **[Source Code Version Control Events](source-code-version-control.md)**: Events emitted by changes in source code or by the creation, modification or deletion of new repositories that hold source code.
13+
- **[Continuous Integration Pipelines Events](continuous-integration-pipeline-events.md)**: includes events related to building, testings, packaging and releasing software artifacts, usually binaries.
14+
- **[Continuous Deployment Pipelines Events](continuous-deployment-pipeline-events.md)**: include events related with environments where the artifacts produced by the integration pipelines actually run. These are usually services running in a specific environment (dev, QA, production), or embedded software running in a specific hardware.
15+
16+
These phases can also be considered as different profiles of the vocabulary that can be adopted independently.
17+
Also notice that we currently use the term 'pipeline' to denote a pipelines, workflows and related concepts. We also use the term 'task' to denote a job/stage/step.
18+
19+
## Required Metadata for CD Events
20+
21+
The following attributes are REQUIRED to be present in all the Events defined in this vocabulary:
22+
23+
- **Event ID**: defines a unique identifier for the event
24+
- **Event Type**: defines a textual description of the event type, only event types described in this document are supported. All event types should be prefixed with `cd.`
25+
- **Event Source**: defines the context in which an event happened
26+
- **Event Timestamp**: defines the time when the event was produced
27+
28+
The following sections list the events in different phases, allowing adopters to choose the events that they are more interested in.

0 commit comments

Comments
 (0)