Skip to content

Commit

Permalink
Fix event types in schema
Browse files Browse the repository at this point in the history
Add a new tool to control event versions in the schema and spec.
Fix the event versions in schema and spec.

Signed-off-by: Andrea Frittoli <[email protected]>
  • Loading branch information
afrittoli committed Nov 21, 2022
1 parent 4fead31 commit ffe67bb
Show file tree
Hide file tree
Showing 37 changed files with 310 additions and 45 deletions.
16 changes: 8 additions & 8 deletions continuous-deployment-pipeline-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ A `service` can represent for example a binary that is running, a daemon, an app

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.1`__
- Event Type: __`dev.cdevents.environment.created.0.1.0`__
- Predicate: created
- Subject: [`environment`](#environment)

Expand All @@ -62,7 +62,7 @@ This event represents an environment that has been created. Such an environment

This event represents an environment that has been modified.

- Event Type: __`dev.cdevents.environment.modified.0.1`__
- Event Type: __`dev.cdevents.environment.modified.0.1.0`__
- Predicate: modified
- Subject: [`environment`](#environment)

Expand All @@ -77,7 +77,7 @@ This event represents an environment that has been modified.

This event represents an environment that has been deleted.```

- Event Type: __`dev.cdevents.environment.deleted.0.1`__
- Event Type: __`dev.cdevents.environment.deleted.0.1.0`__
- Predicate: deleted
- Subject: [`environment`](#environment)

Expand All @@ -91,7 +91,7 @@ This event represents an environment that has been deleted.```

This event represents a new instance of a service that has been deployed

- Event Type: __`dev.cdevents.service.deployed.0.1`__
- Event Type: __`dev.cdevents.service.deployed.0.1.0`__
- Predicate: deployed
- Subject: [`service`](#service)

Expand All @@ -105,7 +105,7 @@ This event represents a new instance of a service that has been deployed

This event represents an existing instance of a service that has been upgraded to a new version

- Event Type: __`dev.cdevents.service.upgraded.0.1`__
- Event Type: __`dev.cdevents.service.upgraded.0.1.0`__
- Predicate: upgraded
- Subject: [`service`](#service)

Expand All @@ -119,7 +119,7 @@ This event represents an existing instance of a service that has been upgraded t

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.1`__
- Event Type: __`dev.cdevents.service.rolledback.0.1.0`__
- Predicate: rolledback
- Subject: [`service`](#service)

Expand All @@ -133,7 +133,7 @@ This event represents an existing instance of a service that has been rolled bac

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.1`__
- Event Type: __`dev.cdevents.service.removed.0.1.0`__
- Predicate: removed
- Subject: [`service`](#service)

Expand All @@ -146,7 +146,7 @@ This event represents the removal of a previously deployed service instance and

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.1`__
- Event Type: __`dev.cdevents.service.published.0.1.0`__
- Predicate: published
- Subject: [`service`](#service)

Expand Down
5 changes: 4 additions & 1 deletion schemas/artifactpackaged.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.artifact.packaged.0.1.0"
],
"default": "dev.cdevents.artifact.packaged.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/artifactpublished.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.artifact.published.0.1.0"
],
"default": "dev.cdevents.artifact.published.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/branchcreated.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.branch.created.0.1.1"
],
"default": "dev.cdevents.branch.created.0.1.1"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/branchdeleted.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.branch.deleted.0.1.1"
],
"default": "dev.cdevents.branch.deleted.0.1.1"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/buildfinished.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.build.finished.0.1.0"
],
"default": "dev.cdevents.build.finished.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/buildqueued.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.build.queued.0.1.0"
],
"default": "dev.cdevents.build.queued.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/buildstarted.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.build.started.0.1.0"
],
"default": "dev.cdevents.build.started.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/changeabandoned.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.change.abandoned.0.1.1"
],
"default": "dev.cdevents.change.abandoned.0.1.1"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/changecreated.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.change.created.0.1.1"
],
"default": "dev.cdevents.change.created.0.1.1"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/changemerged.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.change.merged.0.1.1"
],
"default": "dev.cdevents.change.merged.0.1.1"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/changereviewed.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.change.reviewed.0.1.1"
],
"default": "dev.cdevents.change.reviewed.0.1.1"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/changeupdated.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.change.updated.0.1.1"
],
"default": "dev.cdevents.change.updated.0.1.1"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/environmentcreated.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.environment.created.0.1.0"
],
"default": "dev.cdevents.environment.created.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/environmentdeleted.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.environment.deleted.0.1.0"
],
"default": "dev.cdevents.environment.deleted.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/environmentmodified.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.environment.modified.0.1.0"
],
"default": "dev.cdevents.environment.modified.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/pipelinerunfinished.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.pipelinerun.finished.0.1.0"
],
"default": "dev.cdevents.pipelinerun.finished.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/pipelinerunqueued.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.pipelinerun.queued.0.1.0"
],
"default": "dev.cdevents.pipelinerun.queued.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/pipelinerunstarted.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.pipelinerun.started.0.1.0"
],
"default": "dev.cdevents.pipelinerun.started.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/repositorycreated.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.repository.created.0.1.0"
],
"default": "dev.cdevents.repository.created.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/repositorydeleted.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.repository.deleted.0.1.0"
],
"default": "dev.cdevents.repository.deleted.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/repositorymodified.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.repository.modified.0.1.0"
],
"default": "dev.cdevents.repository.modified.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/servicedeployed.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.service.deployed.0.1.0"
],
"default": "dev.cdevents.service.deployed.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/servicepublished.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.service.published.0.1.0"
],
"default": "dev.cdevents.service.published.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/serviceremoved.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.service.removed.0.1.0"
],
"default": "dev.cdevents.service.removed.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/servicerolledback.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.service.rolledback.0.1.0"
],
"default": "dev.cdevents.service.rolledback.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/serviceupgraded.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.service.upgraded.0.1.0"
],
"default": "dev.cdevents.service.upgraded.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
5 changes: 4 additions & 1 deletion schemas/taskrunfinished.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
},
"type": {
"type": "string",
"minLength": 1
"enum": [
"dev.cdevents.taskrun.finished.0.1.0"
],
"default": "dev.cdevents.taskrun.finished.0.1.0"
},
"timestamp": {
"type": "string",
Expand Down
Loading

0 comments on commit ffe67bb

Please sign in to comment.