Skip to content

Commit ffe67bb

Browse files
committed
Fix event types in schema
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]>
1 parent 4fead31 commit ffe67bb

37 files changed

+310
-45
lines changed

continuous-deployment-pipeline-events.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ A `service` can represent for example a binary that is running, a daemon, an app
4747

4848
This event represents an environment that has been created. Such an environment can be used to deploy services in.
4949

50-
- Event Type: __`dev.cdevents.environment.created.0.1`__
50+
- Event Type: __`dev.cdevents.environment.created.0.1.0`__
5151
- Predicate: created
5252
- Subject: [`environment`](#environment)
5353

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

6363
This event represents an environment that has been modified.
6464

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

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

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

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

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

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

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

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

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

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

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

120120
This event represents an existing instance of a service that has been rolled back to a previous version
121121

122-
- Event Type: __`dev.cdevents.service.rolledback.0.1`__
122+
- Event Type: __`dev.cdevents.service.rolledback.0.1.0`__
123123
- Predicate: rolledback
124124
- Subject: [`service`](#service)
125125

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

134134
This event represents the removal of a previously deployed service instance and is thus not longer present in the specified environment
135135

136-
- Event Type: __`dev.cdevents.service.removed.0.1`__
136+
- Event Type: __`dev.cdevents.service.removed.0.1.0`__
137137
- Predicate: removed
138138
- Subject: [`service`](#service)
139139

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

147147
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.
148148

149-
- Event Type: __`dev.cdevents.service.published.0.1`__
149+
- Event Type: __`dev.cdevents.service.published.0.1.0`__
150150
- Predicate: published
151151
- Subject: [`service`](#service)
152152

schemas/artifactpackaged.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.artifact.packaged.0.1.0"
23+
],
24+
"default": "dev.cdevents.artifact.packaged.0.1.0"
2225
},
2326
"timestamp": {
2427
"type": "string",

schemas/artifactpublished.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.artifact.published.0.1.0"
23+
],
24+
"default": "dev.cdevents.artifact.published.0.1.0"
2225
},
2326
"timestamp": {
2427
"type": "string",

schemas/branchcreated.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.branch.created.0.1.1"
23+
],
24+
"default": "dev.cdevents.branch.created.0.1.1"
2225
},
2326
"timestamp": {
2427
"type": "string",

schemas/branchdeleted.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.branch.deleted.0.1.1"
23+
],
24+
"default": "dev.cdevents.branch.deleted.0.1.1"
2225
},
2326
"timestamp": {
2427
"type": "string",

schemas/buildfinished.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.build.finished.0.1.0"
23+
],
24+
"default": "dev.cdevents.build.finished.0.1.0"
2225
},
2326
"timestamp": {
2427
"type": "string",

schemas/buildqueued.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.build.queued.0.1.0"
23+
],
24+
"default": "dev.cdevents.build.queued.0.1.0"
2225
},
2326
"timestamp": {
2427
"type": "string",

schemas/buildstarted.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.build.started.0.1.0"
23+
],
24+
"default": "dev.cdevents.build.started.0.1.0"
2225
},
2326
"timestamp": {
2427
"type": "string",

schemas/changeabandoned.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.change.abandoned.0.1.1"
23+
],
24+
"default": "dev.cdevents.change.abandoned.0.1.1"
2225
},
2326
"timestamp": {
2427
"type": "string",

schemas/changecreated.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@
1818
},
1919
"type": {
2020
"type": "string",
21-
"minLength": 1
21+
"enum": [
22+
"dev.cdevents.change.created.0.1.1"
23+
],
24+
"default": "dev.cdevents.change.created.0.1.1"
2225
},
2326
"timestamp": {
2427
"type": "string",

0 commit comments

Comments
 (0)