├── .github └── workflows │ └── release.yml ├── CODEOWNERS ├── LICENSE ├── README.md ├── cloudevents.md ├── import_package.md ├── remediation.md ├── schemas └── shipyard.json ├── service_level_indicator.md ├── service_level_objective.md ├── shipyard.md └── webhook.md /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Update spec in keptn repos 2 | on: 3 | push: 4 | tags: 5 | - "*" 6 | workflow_dispatch: 7 | inputs: 8 | tag: 9 | description: 'Tag to which the spec in the keptn/keptn repo should be updated to. Example: refs/tags/0.2.3' 10 | required: true 11 | default: '' 12 | jobs: 13 | send_webhook: 14 | runs-on: ubuntu-20.04 15 | strategy: 16 | matrix: 17 | repo: ['keptn/keptn', 'keptn/go-utils'] 18 | steps: 19 | - name: Trigger spec auto update in core repo 20 | if: github.event_name == 'push' 21 | uses: peter-evans/repository-dispatch@v1 22 | with: 23 | token: ${{ secrets.KEPTN_BOT_TOKEN }} 24 | repository: ${{ matrix.repo }} 25 | event-type: spec-update 26 | client-payload: '{"ref": "${{ github.ref }}"}' 27 | 28 | - name: Trigger manual spec update in core repo 29 | if: github.event_name == 'workflow_dispatch' 30 | uses: peter-evans/repository-dispatch@v1 31 | with: 32 | token: ${{ secrets.KEPTN_BOT_TOKEN }} 33 | repository: ${{ matrix.repo }} 34 | event-type: spec-update 35 | client-payload: '{"ref": "${{ github.event.inputs.tag }}"}' 36 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | ############################################################## 2 | # 3 | # List of approvers/reviewers for Keptn Spec 4 | # 5 | ############################################################## 6 | # 7 | # Get in touch with us via the Keptn Community 8 | # https://github.com/keptn/community 9 | # 10 | # 11 | # Learn about CODEOWNERS file format: 12 | # https://help.github.com/en/articles/about-code-owners 13 | # 14 | 15 | * @AloisReitbauer @christian-kreuzberger-dtx @johannes-b @danielkhan 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2019 The Keptn Authors 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Keptn Specification 2 | 3 | ## Keptn V1 has reached end of life on December 22nd, 2023 and has been [replaced](https://github.com/keptn/lifecycle-toolkit). 4 | 5 | ![GitHub release (latest by date)](https://img.shields.io/github/v/release/keptn/spec) 6 | 7 | This repository contains the specification for the [Keptn](https://keptn.sh) project, which describes requirements and expectations of all Keptn related services and implementations. 8 | 9 | ## Versioning 10 | 11 | Changes to this spec repo are versioned and changes can be tracked via the [GitHub releases page](https://github.com/keptn/spec/releases). Specific implementations of the specification should specify which version of the spec they implement. 12 | 13 | ## Contributions 14 | 15 | Please use [issues](https://github.com/keptn/spec/issues) to suggest changes or ask questions, and [pull requests](https://github.com/keptn/spec/pulls) for actual changes on the spec. 16 | 17 | ## Index 18 | 19 | * [Specification of Keptn Cloud Events](cloudevents.md) 20 | * [Specification of Shipyard](shipyard.md) 21 | * [Specification of Remediation](remediation.md) 22 | * [Specification of Service Level Indicator](service_level_indicator.md) 23 | * [Specification of Service Level Objective](service_level_objective.md) 24 | * [Specification of Import package](import_package.md) 25 | * [Specification of Webhook](webhook.md) 26 | -------------------------------------------------------------------------------- /cloudevents.md: -------------------------------------------------------------------------------- 1 | # Keptn CloudEvents 2 | * [Project](#project) 3 | * [Service](#service) 4 | * [Approval](#approval) 5 | * [Deployment](#deployment) 6 | * [Rollback](#rollback) 7 | * [Test](#test) 8 | * [Evaluation](#evaluation) 9 | * [Release](#release) 10 | * [Get-Action](#get-action) 11 | * [Action](#action) 12 | * [Get-SLI](#get-sli) 13 | * [Monitoring](#monitoring) 14 | * [Problem](#problem) 15 | * [Error Log](#error-log) 16 | --- 17 | All Keptn events conform to the CloudEvents spec in [version 1.0](https://github.com/cloudevents/spec/blob/v1.0/spec.md). The CloudEvents specification is a vendor-neutral specification for defining the format of event data. 18 | 19 | In Keptn, events have a payload structure as follows (*Note:* The `triggeredid` is not contained in events of type `triggered` mentioned below): 20 | ```json 21 | "sh.keptn.event": { 22 | "required": [ 23 | "data", 24 | "id", 25 | "shkeptncontext", 26 | "source", 27 | "specversion", 28 | "time", 29 | "triggeredid", 30 | "gitcommitid", 31 | "type" 32 | ], 33 | "properties": { 34 | "data": { 35 | "type": ["object", "string"], 36 | "description": "The Keptn event payload depending on the type." 37 | }, 38 | "id": { 39 | "type": "string", 40 | "minLength": 1, 41 | "description": "Unique UUID of the Keptn event" 42 | }, 43 | "shkeptncontext": { 44 | "format": "uuid", 45 | "type": "string", 46 | "description": "Unique UUID value that connects various events together" 47 | }, 48 | "source": { 49 | "format": "uri-reference", 50 | "type": "string", 51 | "minLength": 1, 52 | "description": "URL to service implementation in Keptn code repo" 53 | }, 54 | "specversion": { 55 | "type": "string", 56 | "minLength": 1, 57 | "description": "The version of the CloudEvents specification", 58 | "value": "1.0" 59 | }, 60 | "shkeptnspecversion": { 61 | "type": "string", 62 | "minLength": 1, 63 | "description": "The version of the Keptn specification", 64 | "value": "0.2.0" 65 | }, 66 | "time": { 67 | "format": "date-time", 68 | "type": "string", 69 | "description": "Timestamp of when the event happened" 70 | }, 71 | "triggeredid": { 72 | "format": "uuid", 73 | "type": "string", 74 | "description": "The event ID that has triggered the step" 75 | }, 76 | "gitcommitid": { 77 | "format": "uuid", 78 | "type": "string", 79 | "description": "The git commit ID of the resource used in the context" 80 | }, 81 | "type": { 82 | "type": "string", 83 | "minLength": 1, 84 | "description": "Type of the Keptn event" 85 | } 86 | }, 87 | "additionalProperties": false, 88 | "type": "object" 89 | } 90 | ``` 91 | ## Type 92 | In Keptn, events follow two different formats of event types. One is related to the overall status of a **task sequence execution**, while the other format is related to the execution of a **certain task within a sequence**. 93 | ### Task sequence events 94 | The event type of a Keptn CloudEvent concerning the overall state of a task sequence has the following format: 95 | 96 | * `sh.keptn.event.[stage].[task sequence].[event status]` - For events concerning the execution of a task sequence 97 | 98 | As indicated by the brackets, the event type is defined by a **stage**, **task sequence** and the **event status**. 99 | * The task sequence is declared in the [Shipyard](https://github.com/keptn/spec/blob/master/shipyard.md) of a project. 100 | * The kinds of event states are defined with: `triggered` and `finished` 101 | 102 | For example, if a task sequence with the name `delivery` in the stage `hardening` should be executed, it has to be triggered by sending an event with the type `sh.keptn.event.hardening.delivery.triggered`. Once the `delivery` sequence is completed, a `sh.keptn.event.hardening.delivery.finished` event will be sent to indicate the completion of the task sequence. 103 | 104 | 105 | ### Task events 106 | The event type of a Keptn CloudEvent concerning the execution of a certain task within a task sequence has the following format: 107 | 108 | * `sh.keptn.event.[task].[event status]` - For events concerning the execution of a certain task within a task sequence 109 | 110 | As indicated by the brackets, the event type is defined by a **task** and the **event status**. 111 | * The task is declared in the [Shipyard](https://github.com/keptn/spec/blob/master/shipyard.md) of a project. For example, a Shipyard can contain tasks like: `deployment`, `test`, or `evaluation`. Consequently, the event type for a `deployment` task would be `sh.keptn.event.deployment.[event status]` 112 | * The kinds of event states are defined with: `triggered`, `started`, `status.changed`, and `finished` (`status.changed` is optional) 113 | 114 | By combining the *task* and *event status* for the `deployment` task, the event types are: 115 | 116 | * `sh.keptn.event.deployment.triggered` 117 | * `sh.keptn.event.deployment.started` 118 | * `sh.keptn.event.deployment.status.changed` 119 | * `sh.keptn.event.deployment.finished` 120 | 121 | ## Standard vs. Custom Task Events 122 | This page shows some standard task events such as `deployment`, `test` and `evaluation`. The Keptn project has chosen to define these as they are common "tasks" that DevOps and SRE practioners want to achieve. 123 | 124 | The Shipyard file accepts any `String` as a task name: you are not limited to only the tasks shown on this page. 125 | 126 | Keptn core will "translate" the task name to a cloudevent `type` and build that `taskname.triggered` event automatically for you. 127 | 128 | For example, given this Shipyard: 129 | 130 | ``` 131 | ... 132 | tasks: 133 | - name: "my-custom-task" 134 | ... 135 | ``` 136 | 137 | Keptn would "automatically" translate that at runtime into a cloudevent like this: 138 | 139 | ``` 140 | { 141 | ... 142 | "type": "sh.keptn.event.my-custom-task.triggered" 143 | ... 144 | } 145 | ``` 146 | 147 | All tasks have a lifecycle: 148 | 149 | 1. task.triggered 150 | 2. task.started 151 | 3. task.status.changed (optional) 152 | 4. task.finished 153 | 154 | Any custom integrations must craft and send back these events such as `task.started`: 155 | 156 | ``` 157 | { 158 | ... 159 | "type": "sh.keptn.event.my-custom-task.started" 160 | ... 161 | } 162 | ``` 163 | 164 | `task.status.changed`: 165 | ``` 166 | { 167 | ... 168 | "type": "sh.keptn.event.my-custom-task.status.changed" 169 | ... 170 | } 171 | ``` 172 | 173 | And `task.finished`: 174 | ``` 175 | { 176 | ... 177 | "type": "sh.keptn.event.my-custom-task.started" 178 | ... 179 | } 180 | ``` 181 | 182 | ## Data 183 | The data block of a Keptn CloudEvent carries the Keptn Payload of a specific event and contains the properties: 184 | * labels 185 | * message 186 | * project 187 | * service 188 | * stage 189 | * status: indicates whether the service executing the task was able to perform the task without any unexpected errors. Possible values are `succeeded`, `errored`,or `unknown` 190 | * result: indicates the result of a successful task execution without unexpected problems (i.e. status = `succeeded`), such as the result of an evaluation, or a test execution. Possible values are `pass`, `warning`, or `fail` 191 | * *[task]* 192 | 193 | Like the task property in the event type, the task property in the data block depends on the task declaration in the Shipyard. Based on the example of a `deployment` task, the data block contains a `deployment` property of type object. Hence, any payload can be added to this `deployment` property 194 | 195 | In the following each data block is described and an example of a CloudEvent containing the data block is given. 196 | 197 | 198 | ### Project 199 | #### Project Create Triggered 200 | ##### Type 201 | sh.keptn.event.project.create.triggered 202 | ##### Data Json Schema 203 | 204 |
Json Schema of sh.keptn.event.project.create.triggered 205 |

206 | 207 | ```json 208 | { 209 | "$schema": "http://json-schema.org/draft-04/schema#", 210 | "$ref": "#/definitions/ProjectCreateData", 211 | "definitions": { 212 | "ProjectCreateData": { 213 | "required": [ 214 | "projectName", 215 | "shipyard" 216 | ], 217 | "properties": { 218 | "projectName": { 219 | "type": "string" 220 | }, 221 | "gitRemoteURL": { 222 | "type": "string" 223 | }, 224 | "shipyard": { 225 | "type": "string" 226 | } 227 | }, 228 | "additionalProperties": false, 229 | "type": "object" 230 | } 231 | } 232 | } 233 | ``` 234 |

235 |
236 | 237 | ##### Example Cloud Event 238 | 239 | ```json 240 | { 241 | "specversion": "1.0", 242 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 243 | "source": "source-service", 244 | "type": "sh.keptn.event.project.create.triggered", 245 | "datacontenttype": "application/json", 246 | "data": { 247 | "projectName": "sockshop", 248 | "gitRemoteURL": "https://github.com/project/repository", 249 | "shipyard": "c3RhZ2VzOg0KICAtIG5hbWU6ICJkZXYiDQogICAgZGVwbG95bWVudF9zdHJhdGVneTogImRpcmVjdCINCiAgICB0ZXN0X3N0cmF0ZWd5OiAiZnVuY3Rpb25hbCINCiAgLSBuYW1lOiAic3RhZ2luZyINCiAgICBkZXBsb3ltZW50X3N0cmF0ZWd5OiAiYmx1ZV9ncmVlbl9zZXJ2aWNlIg0KICAgIHRlc3Rfc3RyYXRlZ3k6ICJwZXJmb3JtYW5jZSINCiAgLSBuYW1lOiAicHJvZHVjdGlvbiINCiAgICBkZXBsb3ltZW50X3N0cmF0ZWd5OiAiYmx1ZV9ncmVlbl9zZXJ2aWNlIg0KICAgIHJlbWVkaWF0aW9uX3N0cmF0ZWd5OiAiYXV0b21hdGVkIg0K" 250 | }, 251 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 252 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 253 | } 254 | ``` 255 | 256 | ([↑ up to index](#keptn-cloud-events)) 257 | #### Project Create Started 258 | ##### Type 259 | sh.keptn.event.project.create.started 260 | ##### Data Json Schema 261 | 262 |
Json Schema of sh.keptn.event.project.create.started 263 |

264 | 265 | ```json 266 | { 267 | "$schema": "http://json-schema.org/draft-04/schema#", 268 | "$ref": "#/definitions/ProjectCreateStartedEventData", 269 | "definitions": { 270 | "ProjectCreateStartedEventData": { 271 | "properties": { 272 | "project": { 273 | "type": "string" 274 | }, 275 | "stage": { 276 | "type": "string" 277 | }, 278 | "service": { 279 | "type": "string" 280 | }, 281 | "labels": { 282 | "patternProperties": { 283 | ".*": { 284 | "type": "string" 285 | } 286 | }, 287 | "type": "object" 288 | }, 289 | "status": { 290 | "enum": [ 291 | "succeeded", 292 | "errored", 293 | "unknown" 294 | ], 295 | "type": "string" 296 | }, 297 | "result": { 298 | "enum": [ 299 | "pass", 300 | "warning", 301 | "fail" 302 | ], 303 | "type": "string" 304 | }, 305 | "message": { 306 | "type": "string" 307 | } 308 | }, 309 | "additionalProperties": false, 310 | "type": "object" 311 | } 312 | } 313 | } 314 | ``` 315 |

316 |
317 | 318 | ##### Example Cloud Event 319 | 320 | ```json 321 | { 322 | "specversion": "1.0", 323 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 324 | "source": "source-service", 325 | "type": "sh.keptn.event.project.create.started", 326 | "datacontenttype": "application/json", 327 | "data": { 328 | "project": "sockshop", 329 | "stage": "dev", 330 | "service": "carts", 331 | "labels": { 332 | "label-key": "label-value" 333 | }, 334 | "status": "succeeded", 335 | "result": "pass", 336 | "message": "a message" 337 | }, 338 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 339 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 340 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 341 | } 342 | ``` 343 | 344 | ([↑ up to index](#keptn-cloud-events)) 345 | #### Project Create Finished 346 | ##### Type 347 | sh.keptn.event.project.create.finished 348 | ##### Data Json Schema 349 | 350 |
Json Schema of sh.keptn.event.project.create.finished 351 |

352 | 353 | ```json 354 | { 355 | "$schema": "http://json-schema.org/draft-04/schema#", 356 | "$ref": "#/definitions/ProjectCreateFinishedEventData", 357 | "definitions": { 358 | "ProjectCreateData": { 359 | "required": [ 360 | "projectName", 361 | "shipyard" 362 | ], 363 | "properties": { 364 | "projectName": { 365 | "type": "string" 366 | }, 367 | "gitRemoteURL": { 368 | "type": "string" 369 | }, 370 | "shipyard": { 371 | "type": "string" 372 | } 373 | }, 374 | "additionalProperties": false, 375 | "type": "object" 376 | }, 377 | "ProjectCreateFinishedEventData": { 378 | "required": [ 379 | "createdProject" 380 | ], 381 | "properties": { 382 | "project": { 383 | "type": "string" 384 | }, 385 | "stage": { 386 | "type": "string" 387 | }, 388 | "service": { 389 | "type": "string" 390 | }, 391 | "labels": { 392 | "patternProperties": { 393 | ".*": { 394 | "type": "string" 395 | } 396 | }, 397 | "type": "object" 398 | }, 399 | "status": { 400 | "enum": [ 401 | "succeeded", 402 | "errored", 403 | "unknown" 404 | ], 405 | "type": "string" 406 | }, 407 | "result": { 408 | "enum": [ 409 | "pass", 410 | "warning", 411 | "fail" 412 | ], 413 | "type": "string" 414 | }, 415 | "message": { 416 | "type": "string" 417 | }, 418 | "createdProject": { 419 | "$schema": "http://json-schema.org/draft-04/schema#", 420 | "$ref": "#/definitions/ProjectCreateData" 421 | } 422 | }, 423 | "additionalProperties": false, 424 | "type": "object" 425 | } 426 | } 427 | } 428 | ``` 429 |

430 |
431 | 432 | ##### Example Cloud Event 433 | 434 | ```json 435 | { 436 | "specversion": "1.0", 437 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 438 | "source": "source-service", 439 | "type": "sh.keptn.event.project.create.finished", 440 | "datacontenttype": "application/json", 441 | "data": { 442 | "project": "sockshop", 443 | "stage": "dev", 444 | "service": "carts", 445 | "labels": { 446 | "label-key": "label-value" 447 | }, 448 | "status": "succeeded", 449 | "result": "pass", 450 | "message": "a message", 451 | "createdProject": { 452 | "projectName": "sockshop", 453 | "gitRemoteURL": "https://github.com/project/repository", 454 | "shipyard": "c3RhZ2VzOg0KICAtIG5hbWU6ICJkZXYiDQogICAgZGVwbG95bWVudF9zdHJhdGVneTogImRpcmVjdCINCiAgICB0ZXN0X3N0cmF0ZWd5OiAiZnVuY3Rpb25hbCINCiAgLSBuYW1lOiAic3RhZ2luZyINCiAgICBkZXBsb3ltZW50X3N0cmF0ZWd5OiAiYmx1ZV9ncmVlbl9zZXJ2aWNlIg0KICAgIHRlc3Rfc3RyYXRlZ3k6ICJwZXJmb3JtYW5jZSINCiAgLSBuYW1lOiAicHJvZHVjdGlvbiINCiAgICBkZXBsb3ltZW50X3N0cmF0ZWd5OiAiYmx1ZV9ncmVlbl9zZXJ2aWNlIg0KICAgIHJlbWVkaWF0aW9uX3N0cmF0ZWd5OiAiYXV0b21hdGVkIg0K" 455 | } 456 | }, 457 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 458 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 459 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 460 | } 461 | ``` 462 | 463 | ([↑ up to index](#keptn-cloud-events)) 464 | ### Service 465 | #### Service Create Started 466 | ##### Type 467 | sh.keptn.event.service.create.started 468 | ##### Data Json Schema 469 | 470 |
Json Schema of sh.keptn.event.service.create.started 471 |

472 | 473 | ```json 474 | { 475 | "$schema": "http://json-schema.org/draft-04/schema#", 476 | "$ref": "#/definitions/ServiceCreateStartedEventData", 477 | "definitions": { 478 | "ServiceCreateStartedEventData": { 479 | "properties": { 480 | "project": { 481 | "type": "string" 482 | }, 483 | "stage": { 484 | "type": "string" 485 | }, 486 | "service": { 487 | "type": "string" 488 | }, 489 | "labels": { 490 | "patternProperties": { 491 | ".*": { 492 | "type": "string" 493 | } 494 | }, 495 | "type": "object" 496 | }, 497 | "status": { 498 | "enum": [ 499 | "succeeded", 500 | "errored", 501 | "unknown" 502 | ], 503 | "type": "string" 504 | }, 505 | "result": { 506 | "enum": [ 507 | "pass", 508 | "warning", 509 | "fail" 510 | ], 511 | "type": "string" 512 | }, 513 | "message": { 514 | "type": "string" 515 | } 516 | }, 517 | "additionalProperties": false, 518 | "type": "object" 519 | } 520 | } 521 | } 522 | ``` 523 |

524 |
525 | 526 | ##### Example Cloud Event 527 | 528 | ```json 529 | { 530 | "specversion": "1.0", 531 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 532 | "source": "source-service", 533 | "type": "sh.keptn.event.service.create.started", 534 | "datacontenttype": "application/json", 535 | "data": { 536 | "project": "sockshop", 537 | "stage": "dev", 538 | "service": "carts", 539 | "labels": { 540 | "label-key": "label-value" 541 | }, 542 | "status": "succeeded", 543 | "result": "pass", 544 | "message": "a message" 545 | }, 546 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 547 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 548 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 549 | } 550 | ``` 551 | 552 | ([↑ up to index](#keptn-cloud-events)) 553 | #### Service Create Status Changed 554 | ##### Type 555 | sh.keptn.event.service.create.status.changed 556 | ##### Data Json Schema 557 | 558 |
Json Schema of sh.keptn.event.service.create.status.changed 559 |

560 | 561 | ```json 562 | { 563 | "$schema": "http://json-schema.org/draft-04/schema#", 564 | "$ref": "#/definitions/ServiceCreateStatusChangedEventData", 565 | "definitions": { 566 | "ServiceCreateStatusChangedEventData": { 567 | "properties": { 568 | "project": { 569 | "type": "string" 570 | }, 571 | "stage": { 572 | "type": "string" 573 | }, 574 | "service": { 575 | "type": "string" 576 | }, 577 | "labels": { 578 | "patternProperties": { 579 | ".*": { 580 | "type": "string" 581 | } 582 | }, 583 | "type": "object" 584 | }, 585 | "status": { 586 | "enum": [ 587 | "succeeded", 588 | "errored", 589 | "unknown" 590 | ], 591 | "type": "string" 592 | }, 593 | "result": { 594 | "enum": [ 595 | "pass", 596 | "warning", 597 | "fail" 598 | ], 599 | "type": "string" 600 | }, 601 | "message": { 602 | "type": "string" 603 | } 604 | }, 605 | "additionalProperties": false, 606 | "type": "object" 607 | } 608 | } 609 | } 610 | ``` 611 |

612 |
613 | 614 | ##### Example Cloud Event 615 | 616 | ```json 617 | { 618 | "specversion": "1.0", 619 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 620 | "source": "source-service", 621 | "type": "sh.keptn.event.service.create.status.changed", 622 | "datacontenttype": "application/json", 623 | "data": { 624 | "project": "sockshop", 625 | "stage": "dev", 626 | "service": "carts", 627 | "labels": { 628 | "label-key": "label-value" 629 | }, 630 | "status": "succeeded", 631 | "result": "pass", 632 | "message": "a message" 633 | }, 634 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 635 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 636 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 637 | } 638 | ``` 639 | 640 | ([↑ up to index](#keptn-cloud-events)) 641 | #### Service Create Finished 642 | ##### Type 643 | sh.keptn.event.service.create.finished 644 | ##### Data Json Schema 645 | 646 |
Json Schema of sh.keptn.event.service.create.finished 647 |

648 | 649 | ```json 650 | { 651 | "$schema": "http://json-schema.org/draft-04/schema#", 652 | "$ref": "#/definitions/ServiceCreateFinishedEventData", 653 | "definitions": { 654 | "ServiceCreateFinishedEventData": { 655 | "properties": { 656 | "project": { 657 | "type": "string" 658 | }, 659 | "stage": { 660 | "type": "string" 661 | }, 662 | "service": { 663 | "type": "string" 664 | }, 665 | "labels": { 666 | "patternProperties": { 667 | ".*": { 668 | "type": "string" 669 | } 670 | }, 671 | "type": "object" 672 | }, 673 | "status": { 674 | "enum": [ 675 | "succeeded", 676 | "errored", 677 | "unknown" 678 | ], 679 | "type": "string" 680 | }, 681 | "result": { 682 | "enum": [ 683 | "pass", 684 | "warning", 685 | "fail" 686 | ], 687 | "type": "string" 688 | }, 689 | "message": { 690 | "type": "string" 691 | } 692 | }, 693 | "additionalProperties": false, 694 | "type": "object" 695 | } 696 | } 697 | } 698 | ``` 699 |

700 |
701 | 702 | ##### Example Cloud Event 703 | 704 | ```json 705 | { 706 | "specversion": "1.0", 707 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 708 | "source": "source-service", 709 | "type": "sh.keptn.event.service.create.finished", 710 | "datacontenttype": "application/json", 711 | "data": { 712 | "project": "sockshop", 713 | "stage": "dev", 714 | "service": "carts", 715 | "labels": { 716 | "label-key": "label-value" 717 | }, 718 | "status": "succeeded", 719 | "result": "pass", 720 | "message": "a message" 721 | }, 722 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 723 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 724 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 725 | } 726 | ``` 727 | 728 | ([↑ up to index](#keptn-cloud-events)) 729 | ### Approval 730 | #### Approval Triggered 731 | ##### Type 732 | sh.keptn.event.approval.triggered 733 | ##### Data Json Schema 734 | 735 |
Json Schema of sh.keptn.event.approval.triggered 736 |

737 | 738 | ```json 739 | { 740 | "$schema": "http://json-schema.org/draft-04/schema#", 741 | "$ref": "#/definitions/ApprovalTriggeredEventData", 742 | "definitions": { 743 | "Approval": { 744 | "required": [ 745 | "pass", 746 | "warning" 747 | ], 748 | "properties": { 749 | "pass": { 750 | "enum": [ 751 | "automatic", 752 | "manual" 753 | ], 754 | "type": "string" 755 | }, 756 | "warning": { 757 | "enum": [ 758 | "automatic", 759 | "manual" 760 | ], 761 | "type": "string" 762 | } 763 | }, 764 | "additionalProperties": false, 765 | "type": "object" 766 | }, 767 | "ApprovalTriggeredEventData": { 768 | "required": [ 769 | "approval" 770 | ], 771 | "properties": { 772 | "project": { 773 | "type": "string" 774 | }, 775 | "stage": { 776 | "type": "string" 777 | }, 778 | "service": { 779 | "type": "string" 780 | }, 781 | "labels": { 782 | "patternProperties": { 783 | ".*": { 784 | "type": "string" 785 | } 786 | }, 787 | "type": "object" 788 | }, 789 | "status": { 790 | "enum": [ 791 | "succeeded", 792 | "errored", 793 | "unknown" 794 | ], 795 | "type": "string" 796 | }, 797 | "result": { 798 | "enum": [ 799 | "pass", 800 | "warning", 801 | "fail" 802 | ], 803 | "type": "string" 804 | }, 805 | "message": { 806 | "type": "string" 807 | }, 808 | "approval": { 809 | "$schema": "http://json-schema.org/draft-04/schema#", 810 | "$ref": "#/definitions/Approval" 811 | } 812 | }, 813 | "additionalProperties": false, 814 | "type": "object" 815 | } 816 | } 817 | } 818 | ``` 819 |

820 |
821 | 822 | ##### Example Cloud Event 823 | 824 | ```json 825 | { 826 | "specversion": "1.0", 827 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 828 | "source": "source-service", 829 | "type": "sh.keptn.event.approval.triggered", 830 | "datacontenttype": "application/json", 831 | "data": { 832 | "project": "sockshop", 833 | "stage": "dev", 834 | "service": "carts", 835 | "labels": { 836 | "label-key": "label-value" 837 | }, 838 | "status": "succeeded", 839 | "result": "pass", 840 | "message": "a message", 841 | "approval": { 842 | "pass": "automatic", 843 | "warning": "manual" 844 | } 845 | }, 846 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 847 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 848 | } 849 | ``` 850 | 851 | ([↑ up to index](#keptn-cloud-events)) 852 | #### Approval Started 853 | ##### Type 854 | sh.keptn.event.approval.started 855 | ##### Data Json Schema 856 | 857 |
Json Schema of sh.keptn.event.approval.started 858 |

859 | 860 | ```json 861 | { 862 | "$schema": "http://json-schema.org/draft-04/schema#", 863 | "$ref": "#/definitions/ApprovalStartedEventData", 864 | "definitions": { 865 | "ApprovalStartedEventData": { 866 | "properties": { 867 | "project": { 868 | "type": "string" 869 | }, 870 | "stage": { 871 | "type": "string" 872 | }, 873 | "service": { 874 | "type": "string" 875 | }, 876 | "labels": { 877 | "patternProperties": { 878 | ".*": { 879 | "type": "string" 880 | } 881 | }, 882 | "type": "object" 883 | }, 884 | "status": { 885 | "enum": [ 886 | "succeeded", 887 | "errored", 888 | "unknown" 889 | ], 890 | "type": "string" 891 | }, 892 | "result": { 893 | "enum": [ 894 | "pass", 895 | "warning", 896 | "fail" 897 | ], 898 | "type": "string" 899 | }, 900 | "message": { 901 | "type": "string" 902 | } 903 | }, 904 | "additionalProperties": false, 905 | "type": "object" 906 | } 907 | } 908 | } 909 | ``` 910 |

911 |
912 | 913 | ##### Example Cloud Event 914 | 915 | ```json 916 | { 917 | "specversion": "1.0", 918 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 919 | "source": "source-service", 920 | "type": "sh.keptn.event.approval.started", 921 | "datacontenttype": "application/json", 922 | "data": { 923 | "project": "sockshop", 924 | "stage": "dev", 925 | "service": "carts", 926 | "labels": { 927 | "label-key": "label-value" 928 | }, 929 | "status": "succeeded", 930 | "result": "pass", 931 | "message": "a message" 932 | }, 933 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 934 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 935 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 936 | } 937 | ``` 938 | 939 | ([↑ up to index](#keptn-cloud-events)) 940 | #### Approval Status Changed 941 | ##### Type 942 | sh.keptn.event.approval.status.changed 943 | ##### Data Json Schema 944 | 945 |
Json Schema of sh.keptn.event.approval.status.changed 946 |

947 | 948 | ```json 949 | { 950 | "$schema": "http://json-schema.org/draft-04/schema#", 951 | "$ref": "#/definitions/ApprovalStatusChangedEventData", 952 | "definitions": { 953 | "ApprovalStatusChangedEventData": { 954 | "properties": { 955 | "project": { 956 | "type": "string" 957 | }, 958 | "stage": { 959 | "type": "string" 960 | }, 961 | "service": { 962 | "type": "string" 963 | }, 964 | "labels": { 965 | "patternProperties": { 966 | ".*": { 967 | "type": "string" 968 | } 969 | }, 970 | "type": "object" 971 | }, 972 | "status": { 973 | "enum": [ 974 | "succeeded", 975 | "errored", 976 | "unknown" 977 | ], 978 | "type": "string" 979 | }, 980 | "result": { 981 | "enum": [ 982 | "pass", 983 | "warning", 984 | "fail" 985 | ], 986 | "type": "string" 987 | }, 988 | "message": { 989 | "type": "string" 990 | } 991 | }, 992 | "additionalProperties": false, 993 | "type": "object" 994 | } 995 | } 996 | } 997 | ``` 998 |

999 |
1000 | 1001 | ##### Example Cloud Event 1002 | 1003 | ```json 1004 | { 1005 | "specversion": "1.0", 1006 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1007 | "source": "source-service", 1008 | "type": "sh.keptn.event.approval.status.changed", 1009 | "datacontenttype": "application/json", 1010 | "data": { 1011 | "project": "sockshop", 1012 | "stage": "dev", 1013 | "service": "carts", 1014 | "labels": { 1015 | "label-key": "label-value" 1016 | }, 1017 | "status": "succeeded", 1018 | "result": "pass", 1019 | "message": "a message" 1020 | }, 1021 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1022 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 1023 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1024 | } 1025 | ``` 1026 | 1027 | ([↑ up to index](#keptn-cloud-events)) 1028 | #### Approval Finished 1029 | ##### Type 1030 | sh.keptn.event.approval.finished 1031 | ##### Data Json Schema 1032 | 1033 |
Json Schema of sh.keptn.event.approval.finished 1034 |

1035 | 1036 | ```json 1037 | { 1038 | "$schema": "http://json-schema.org/draft-04/schema#", 1039 | "$ref": "#/definitions/ApprovalFinishedEventData", 1040 | "definitions": { 1041 | "ApprovalFinishedEventData": { 1042 | "properties": { 1043 | "project": { 1044 | "type": "string" 1045 | }, 1046 | "stage": { 1047 | "type": "string" 1048 | }, 1049 | "service": { 1050 | "type": "string" 1051 | }, 1052 | "labels": { 1053 | "patternProperties": { 1054 | ".*": { 1055 | "type": "string" 1056 | } 1057 | }, 1058 | "type": "object" 1059 | }, 1060 | "status": { 1061 | "enum": [ 1062 | "succeeded", 1063 | "errored", 1064 | "unknown" 1065 | ], 1066 | "type": "string" 1067 | }, 1068 | "result": { 1069 | "enum": [ 1070 | "pass", 1071 | "warning", 1072 | "fail" 1073 | ], 1074 | "type": "string" 1075 | }, 1076 | "message": { 1077 | "type": "string" 1078 | } 1079 | }, 1080 | "additionalProperties": false, 1081 | "type": "object" 1082 | } 1083 | } 1084 | } 1085 | ``` 1086 |

1087 |
1088 | 1089 | ##### Example Cloud Event 1090 | 1091 | ```json 1092 | { 1093 | "specversion": "1.0", 1094 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1095 | "source": "source-service", 1096 | "type": "sh.keptn.event.approval.finished", 1097 | "datacontenttype": "application/json", 1098 | "data": { 1099 | "project": "sockshop", 1100 | "stage": "dev", 1101 | "service": "carts", 1102 | "labels": { 1103 | "label-key": "label-value" 1104 | }, 1105 | "status": "succeeded", 1106 | "result": "pass", 1107 | "message": "a message" 1108 | }, 1109 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1110 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 1111 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1112 | } 1113 | ``` 1114 | 1115 | ([↑ up to index](#keptn-cloud-events)) 1116 | ### Deployment 1117 | #### Deployment Triggered 1118 | ##### Type 1119 | sh.keptn.event.deployment.triggered 1120 | ##### Data Json Schema 1121 | 1122 |
Json Schema of sh.keptn.event.deployment.triggered 1123 |

1124 | 1125 | ```json 1126 | { 1127 | "$schema": "http://json-schema.org/draft-04/schema#", 1128 | "$ref": "#/definitions/DeploymentTriggeredEventData", 1129 | "definitions": { 1130 | "ConfigurationChange": { 1131 | "required": [ 1132 | "values" 1133 | ], 1134 | "properties": { 1135 | "values": { 1136 | "patternProperties": { 1137 | ".*": { 1138 | "additionalProperties": true 1139 | } 1140 | }, 1141 | "type": "object" 1142 | } 1143 | }, 1144 | "additionalProperties": false, 1145 | "type": "object" 1146 | }, 1147 | "DeploymentTriggeredData": { 1148 | "required": [ 1149 | "deploymentURIsLocal", 1150 | "deploymentstrategy" 1151 | ], 1152 | "properties": { 1153 | "deploymentURIsLocal": { 1154 | "items": { 1155 | "type": "string" 1156 | }, 1157 | "type": "array" 1158 | }, 1159 | "deploymentURIsPublic": { 1160 | "items": { 1161 | "type": "string" 1162 | }, 1163 | "type": "array" 1164 | }, 1165 | "deploymentstrategy": { 1166 | "enum": [ 1167 | "direct", 1168 | "blue_green_service", 1169 | "user_managed" 1170 | ], 1171 | "type": "string" 1172 | } 1173 | }, 1174 | "additionalProperties": false, 1175 | "type": "object" 1176 | }, 1177 | "DeploymentTriggeredEventData": { 1178 | "required": [ 1179 | "configurationChange", 1180 | "deployment" 1181 | ], 1182 | "properties": { 1183 | "project": { 1184 | "type": "string" 1185 | }, 1186 | "stage": { 1187 | "type": "string" 1188 | }, 1189 | "service": { 1190 | "type": "string" 1191 | }, 1192 | "labels": { 1193 | "patternProperties": { 1194 | ".*": { 1195 | "type": "string" 1196 | } 1197 | }, 1198 | "type": "object" 1199 | }, 1200 | "status": { 1201 | "enum": [ 1202 | "succeeded", 1203 | "errored", 1204 | "unknown" 1205 | ], 1206 | "type": "string" 1207 | }, 1208 | "result": { 1209 | "enum": [ 1210 | "pass", 1211 | "warning", 1212 | "fail" 1213 | ], 1214 | "type": "string" 1215 | }, 1216 | "message": { 1217 | "type": "string" 1218 | }, 1219 | "configurationChange": { 1220 | "$schema": "http://json-schema.org/draft-04/schema#", 1221 | "$ref": "#/definitions/ConfigurationChange" 1222 | }, 1223 | "deployment": { 1224 | "$schema": "http://json-schema.org/draft-04/schema#", 1225 | "$ref": "#/definitions/DeploymentTriggeredData" 1226 | } 1227 | }, 1228 | "additionalProperties": false, 1229 | "type": "object" 1230 | } 1231 | } 1232 | } 1233 | ``` 1234 |

1235 |
1236 | 1237 | ##### Example Cloud Event 1238 | 1239 | ```json 1240 | { 1241 | "specversion": "1.0", 1242 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1243 | "source": "source-service", 1244 | "type": "sh.keptn.event.deployment.triggered", 1245 | "datacontenttype": "application/json", 1246 | "data": { 1247 | "project": "sockshop", 1248 | "stage": "dev", 1249 | "service": "carts", 1250 | "labels": { 1251 | "label-key": "label-value" 1252 | }, 1253 | "status": "succeeded", 1254 | "result": "pass", 1255 | "message": "a message", 1256 | "configurationChange": { 1257 | "values": { 1258 | "key": "value" 1259 | } 1260 | }, 1261 | "deployment": { 1262 | "deploymentURIsLocal": [ 1263 | "http://carts.sockshop-staging.svc.cluster.local" 1264 | ], 1265 | "deploymentURIsPublic": [ 1266 | "http://carts.sockshot.local:80" 1267 | ], 1268 | "deploymentstrategy": "direct" 1269 | } 1270 | }, 1271 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1272 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1273 | } 1274 | ``` 1275 | 1276 | ([↑ up to index](#keptn-cloud-events)) 1277 | #### Deployment Started 1278 | ##### Type 1279 | sh.keptn.event.deployment.started 1280 | ##### Data Json Schema 1281 | 1282 |
Json Schema of sh.keptn.event.deployment.started 1283 |

1284 | 1285 | ```json 1286 | { 1287 | "$schema": "http://json-schema.org/draft-04/schema#", 1288 | "$ref": "#/definitions/DeploymentStartedEventData", 1289 | "definitions": { 1290 | "DeploymentStartedEventData": { 1291 | "properties": { 1292 | "project": { 1293 | "type": "string" 1294 | }, 1295 | "stage": { 1296 | "type": "string" 1297 | }, 1298 | "service": { 1299 | "type": "string" 1300 | }, 1301 | "labels": { 1302 | "patternProperties": { 1303 | ".*": { 1304 | "type": "string" 1305 | } 1306 | }, 1307 | "type": "object" 1308 | }, 1309 | "status": { 1310 | "enum": [ 1311 | "succeeded", 1312 | "errored", 1313 | "unknown" 1314 | ], 1315 | "type": "string" 1316 | }, 1317 | "result": { 1318 | "enum": [ 1319 | "pass", 1320 | "warning", 1321 | "fail" 1322 | ], 1323 | "type": "string" 1324 | }, 1325 | "message": { 1326 | "type": "string" 1327 | } 1328 | }, 1329 | "additionalProperties": false, 1330 | "type": "object" 1331 | } 1332 | } 1333 | } 1334 | ``` 1335 |

1336 |
1337 | 1338 | ##### Example Cloud Event 1339 | 1340 | ```json 1341 | { 1342 | "specversion": "1.0", 1343 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1344 | "source": "source-service", 1345 | "type": "sh.keptn.event.deployment.started", 1346 | "datacontenttype": "application/json", 1347 | "data": { 1348 | "project": "sockshop", 1349 | "stage": "dev", 1350 | "service": "carts", 1351 | "labels": { 1352 | "label-key": "label-value" 1353 | }, 1354 | "status": "succeeded", 1355 | "result": "pass", 1356 | "message": "a message" 1357 | }, 1358 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1359 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 1360 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1361 | } 1362 | ``` 1363 | 1364 | ([↑ up to index](#keptn-cloud-events)) 1365 | #### Deployment Status Changed 1366 | ##### Type 1367 | sh.keptn.event.deployment.status.changed 1368 | ##### Data Json Schema 1369 | 1370 |
Json Schema of sh.keptn.event.deployment.status.changed 1371 |

1372 | 1373 | ```json 1374 | { 1375 | "$schema": "http://json-schema.org/draft-04/schema#", 1376 | "$ref": "#/definitions/DeploymentStatusChangedEventData", 1377 | "definitions": { 1378 | "DeploymentStatusChangedEventData": { 1379 | "properties": { 1380 | "project": { 1381 | "type": "string" 1382 | }, 1383 | "stage": { 1384 | "type": "string" 1385 | }, 1386 | "service": { 1387 | "type": "string" 1388 | }, 1389 | "labels": { 1390 | "patternProperties": { 1391 | ".*": { 1392 | "type": "string" 1393 | } 1394 | }, 1395 | "type": "object" 1396 | }, 1397 | "status": { 1398 | "enum": [ 1399 | "succeeded", 1400 | "errored", 1401 | "unknown" 1402 | ], 1403 | "type": "string" 1404 | }, 1405 | "result": { 1406 | "enum": [ 1407 | "pass", 1408 | "warning", 1409 | "fail" 1410 | ], 1411 | "type": "string" 1412 | }, 1413 | "message": { 1414 | "type": "string" 1415 | } 1416 | }, 1417 | "additionalProperties": false, 1418 | "type": "object" 1419 | } 1420 | } 1421 | } 1422 | ``` 1423 |

1424 |
1425 | 1426 | ##### Example Cloud Event 1427 | 1428 | ```json 1429 | { 1430 | "specversion": "1.0", 1431 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1432 | "source": "source-service", 1433 | "type": "sh.keptn.event.deployment.status.changed", 1434 | "datacontenttype": "application/json", 1435 | "data": { 1436 | "project": "sockshop", 1437 | "stage": "dev", 1438 | "service": "carts", 1439 | "labels": { 1440 | "label-key": "label-value" 1441 | }, 1442 | "status": "succeeded", 1443 | "result": "pass", 1444 | "message": "a message" 1445 | }, 1446 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1447 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 1448 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1449 | } 1450 | ``` 1451 | 1452 | ([↑ up to index](#keptn-cloud-events)) 1453 | #### Deployment Finished 1454 | ##### Type 1455 | sh.keptn.event.deployment.finished 1456 | ##### Data Json Schema 1457 | 1458 |
Json Schema of sh.keptn.event.deployment.finished 1459 |

1460 | 1461 | ```json 1462 | { 1463 | "$schema": "http://json-schema.org/draft-04/schema#", 1464 | "$ref": "#/definitions/DeploymentFinishedEventData", 1465 | "definitions": { 1466 | "DeploymentFinishedData": { 1467 | "required": [ 1468 | "deploymentstrategy", 1469 | "deploymentURIsLocal", 1470 | "deploymentNames", 1471 | "gitCommit" 1472 | ], 1473 | "properties": { 1474 | "deploymentstrategy": { 1475 | "enum": [ 1476 | "direct", 1477 | "blue_green_service", 1478 | "user_managed" 1479 | ], 1480 | "type": "string" 1481 | }, 1482 | "deploymentURIsLocal": { 1483 | "items": { 1484 | "type": "string" 1485 | }, 1486 | "type": "array" 1487 | }, 1488 | "deploymentURIsPublic": { 1489 | "items": { 1490 | "type": "string" 1491 | }, 1492 | "type": "array" 1493 | }, 1494 | "deploymentNames": { 1495 | "items": { 1496 | "type": "string" 1497 | }, 1498 | "type": "array" 1499 | }, 1500 | "gitCommit": { 1501 | "type": "string" 1502 | } 1503 | }, 1504 | "additionalProperties": false, 1505 | "type": "object" 1506 | }, 1507 | "DeploymentFinishedEventData": { 1508 | "required": [ 1509 | "deployment" 1510 | ], 1511 | "properties": { 1512 | "project": { 1513 | "type": "string" 1514 | }, 1515 | "stage": { 1516 | "type": "string" 1517 | }, 1518 | "service": { 1519 | "type": "string" 1520 | }, 1521 | "labels": { 1522 | "patternProperties": { 1523 | ".*": { 1524 | "type": "string" 1525 | } 1526 | }, 1527 | "type": "object" 1528 | }, 1529 | "status": { 1530 | "enum": [ 1531 | "succeeded", 1532 | "errored", 1533 | "unknown" 1534 | ], 1535 | "type": "string" 1536 | }, 1537 | "result": { 1538 | "enum": [ 1539 | "pass", 1540 | "warning", 1541 | "fail" 1542 | ], 1543 | "type": "string" 1544 | }, 1545 | "message": { 1546 | "type": "string" 1547 | }, 1548 | "deployment": { 1549 | "$schema": "http://json-schema.org/draft-04/schema#", 1550 | "$ref": "#/definitions/DeploymentFinishedData" 1551 | } 1552 | }, 1553 | "additionalProperties": false, 1554 | "type": "object" 1555 | } 1556 | } 1557 | } 1558 | ``` 1559 |

1560 |
1561 | 1562 | ##### Example Cloud Event 1563 | 1564 | ```json 1565 | { 1566 | "specversion": "1.0", 1567 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1568 | "source": "source-service", 1569 | "type": "sh.keptn.event.deployment.finished", 1570 | "datacontenttype": "application/json", 1571 | "data": { 1572 | "project": "sockshop", 1573 | "stage": "dev", 1574 | "service": "carts", 1575 | "labels": { 1576 | "label-key": "label-value" 1577 | }, 1578 | "status": "succeeded", 1579 | "result": "pass", 1580 | "message": "a message", 1581 | "deployment": { 1582 | "deploymentstrategy": "direct", 1583 | "deploymentURIsLocal": [ 1584 | "http://carts.sockshop-staging.svc.cluster.local" 1585 | ], 1586 | "deploymentURIsPublic": [ 1587 | "http://carts.sockshot.local:80" 1588 | ], 1589 | "deploymentNames": [ 1590 | "deployment-1" 1591 | ], 1592 | "gitCommit": "ca82a6dff817gc66f44342007202690a93763949" 1593 | } 1594 | }, 1595 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1596 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 1597 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1598 | } 1599 | ``` 1600 | 1601 | ([↑ up to index](#keptn-cloud-events)) 1602 | ### Rollback 1603 | #### Rollback Triggered 1604 | ##### Type 1605 | sh.keptn.event.rollback.triggered 1606 | ##### Data Json Schema 1607 | 1608 |
Json Schema of sh.keptn.event.rollback.triggered 1609 |

1610 | 1611 | ```json 1612 | { 1613 | "$schema": "http://json-schema.org/draft-04/schema#", 1614 | "$ref": "#/definitions/RollbackTriggeredEventData", 1615 | "definitions": { 1616 | "RollbackTriggeredEventData": { 1617 | "properties": { 1618 | "project": { 1619 | "type": "string" 1620 | }, 1621 | "stage": { 1622 | "type": "string" 1623 | }, 1624 | "service": { 1625 | "type": "string" 1626 | }, 1627 | "labels": { 1628 | "patternProperties": { 1629 | ".*": { 1630 | "type": "string" 1631 | } 1632 | }, 1633 | "type": "object" 1634 | }, 1635 | "status": { 1636 | "enum": [ 1637 | "succeeded", 1638 | "errored", 1639 | "unknown" 1640 | ], 1641 | "type": "string" 1642 | }, 1643 | "result": { 1644 | "enum": [ 1645 | "pass", 1646 | "warning", 1647 | "fail" 1648 | ], 1649 | "type": "string" 1650 | }, 1651 | "message": { 1652 | "type": "string" 1653 | } 1654 | }, 1655 | "additionalProperties": false, 1656 | "type": "object" 1657 | } 1658 | } 1659 | } 1660 | ``` 1661 |

1662 |
1663 | 1664 | ##### Example Cloud Event 1665 | 1666 | ```json 1667 | { 1668 | "specversion": "1.0", 1669 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1670 | "source": "source-service", 1671 | "type": "sh.keptn.event.rollback.triggered", 1672 | "datacontenttype": "application/json", 1673 | "data": { 1674 | "project": "sockshop", 1675 | "stage": "dev", 1676 | "service": "carts", 1677 | "labels": { 1678 | "label-key": "label-value" 1679 | }, 1680 | "status": "succeeded", 1681 | "result": "pass", 1682 | "message": "a message" 1683 | }, 1684 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1685 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1686 | } 1687 | ``` 1688 | 1689 | ([↑ up to index](#keptn-cloud-events)) 1690 | #### Rollback Started 1691 | ##### Type 1692 | sh.keptn.event.rollback.started 1693 | ##### Data Json Schema 1694 | 1695 |
Json Schema of sh.keptn.event.rollback.started 1696 |

1697 | 1698 | ```json 1699 | { 1700 | "$schema": "http://json-schema.org/draft-04/schema#", 1701 | "$ref": "#/definitions/RollbackStartedEventData", 1702 | "definitions": { 1703 | "RollbackStartedEventData": { 1704 | "properties": { 1705 | "project": { 1706 | "type": "string" 1707 | }, 1708 | "stage": { 1709 | "type": "string" 1710 | }, 1711 | "service": { 1712 | "type": "string" 1713 | }, 1714 | "labels": { 1715 | "patternProperties": { 1716 | ".*": { 1717 | "type": "string" 1718 | } 1719 | }, 1720 | "type": "object" 1721 | }, 1722 | "status": { 1723 | "enum": [ 1724 | "succeeded", 1725 | "errored", 1726 | "unknown" 1727 | ], 1728 | "type": "string" 1729 | }, 1730 | "result": { 1731 | "enum": [ 1732 | "pass", 1733 | "warning", 1734 | "fail" 1735 | ], 1736 | "type": "string" 1737 | }, 1738 | "message": { 1739 | "type": "string" 1740 | } 1741 | }, 1742 | "additionalProperties": false, 1743 | "type": "object" 1744 | } 1745 | } 1746 | } 1747 | ``` 1748 |

1749 |
1750 | 1751 | ##### Example Cloud Event 1752 | 1753 | ```json 1754 | { 1755 | "specversion": "1.0", 1756 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1757 | "source": "source-service", 1758 | "type": "sh.keptn.event.rollback.started", 1759 | "datacontenttype": "application/json", 1760 | "data": { 1761 | "project": "sockshop", 1762 | "stage": "dev", 1763 | "service": "carts", 1764 | "labels": { 1765 | "label-key": "label-value" 1766 | }, 1767 | "status": "succeeded", 1768 | "result": "pass", 1769 | "message": "a message" 1770 | }, 1771 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1772 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 1773 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1774 | } 1775 | ``` 1776 | 1777 | ([↑ up to index](#keptn-cloud-events)) 1778 | #### Rollback Finished 1779 | ##### Type 1780 | sh.keptn.event.rollback.finished 1781 | ##### Data Json Schema 1782 | 1783 |
Json Schema of sh.keptn.event.rollback.finished 1784 |

1785 | 1786 | ```json 1787 | { 1788 | "$schema": "http://json-schema.org/draft-04/schema#", 1789 | "$ref": "#/definitions/RollbackFinishedEventData", 1790 | "definitions": { 1791 | "RollbackFinishedEventData": { 1792 | "properties": { 1793 | "project": { 1794 | "type": "string" 1795 | }, 1796 | "stage": { 1797 | "type": "string" 1798 | }, 1799 | "service": { 1800 | "type": "string" 1801 | }, 1802 | "labels": { 1803 | "patternProperties": { 1804 | ".*": { 1805 | "type": "string" 1806 | } 1807 | }, 1808 | "type": "object" 1809 | }, 1810 | "status": { 1811 | "enum": [ 1812 | "succeeded", 1813 | "errored", 1814 | "unknown" 1815 | ], 1816 | "type": "string" 1817 | }, 1818 | "result": { 1819 | "enum": [ 1820 | "pass", 1821 | "warning", 1822 | "fail" 1823 | ], 1824 | "type": "string" 1825 | }, 1826 | "message": { 1827 | "type": "string" 1828 | } 1829 | }, 1830 | "additionalProperties": false, 1831 | "type": "object" 1832 | } 1833 | } 1834 | } 1835 | ``` 1836 |

1837 |
1838 | 1839 | ##### Example Cloud Event 1840 | 1841 | ```json 1842 | { 1843 | "specversion": "1.0", 1844 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1845 | "source": "source-service", 1846 | "type": "sh.keptn.event.rollback.finished", 1847 | "datacontenttype": "application/json", 1848 | "data": { 1849 | "project": "sockshop", 1850 | "stage": "dev", 1851 | "service": "carts", 1852 | "labels": { 1853 | "label-key": "label-value" 1854 | }, 1855 | "status": "succeeded", 1856 | "result": "pass", 1857 | "message": "a message" 1858 | }, 1859 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 1860 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 1861 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 1862 | } 1863 | ``` 1864 | 1865 | ([↑ up to index](#keptn-cloud-events)) 1866 | ### Test 1867 | #### Test Triggered 1868 | ##### Type 1869 | sh.keptn.event.test.triggered 1870 | ##### Data Json Schema 1871 | 1872 |
Json Schema of sh.keptn.event.test.triggered 1873 |

1874 | 1875 | ```json 1876 | { 1877 | "$schema": "http://json-schema.org/draft-04/schema#", 1878 | "$ref": "#/definitions/TestTriggeredEventData", 1879 | "definitions": { 1880 | "TestTriggeredDeploymentDetails": { 1881 | "required": [ 1882 | "deploymentURIsLocal" 1883 | ], 1884 | "properties": { 1885 | "deploymentURIsLocal": { 1886 | "items": { 1887 | "type": "string" 1888 | }, 1889 | "type": "array" 1890 | }, 1891 | "deploymentURIsPublic": { 1892 | "items": { 1893 | "type": "string" 1894 | }, 1895 | "type": "array" 1896 | } 1897 | }, 1898 | "additionalProperties": false, 1899 | "type": "object" 1900 | }, 1901 | "TestTriggeredDetails": { 1902 | "required": [ 1903 | "teststrategy" 1904 | ], 1905 | "properties": { 1906 | "teststrategy": { 1907 | "enum": [ 1908 | "real-user", 1909 | "functional", 1910 | "performance", 1911 | "healthcheck" 1912 | ], 1913 | "type": "string" 1914 | } 1915 | }, 1916 | "additionalProperties": false, 1917 | "type": "object" 1918 | }, 1919 | "TestTriggeredEventData": { 1920 | "required": [ 1921 | "test", 1922 | "deployment" 1923 | ], 1924 | "properties": { 1925 | "project": { 1926 | "type": "string" 1927 | }, 1928 | "stage": { 1929 | "type": "string" 1930 | }, 1931 | "service": { 1932 | "type": "string" 1933 | }, 1934 | "labels": { 1935 | "patternProperties": { 1936 | ".*": { 1937 | "type": "string" 1938 | } 1939 | }, 1940 | "type": "object" 1941 | }, 1942 | "status": { 1943 | "enum": [ 1944 | "succeeded", 1945 | "errored", 1946 | "unknown" 1947 | ], 1948 | "type": "string" 1949 | }, 1950 | "result": { 1951 | "enum": [ 1952 | "pass", 1953 | "warning", 1954 | "fail" 1955 | ], 1956 | "type": "string" 1957 | }, 1958 | "message": { 1959 | "type": "string" 1960 | }, 1961 | "test": { 1962 | "$schema": "http://json-schema.org/draft-04/schema#", 1963 | "$ref": "#/definitions/TestTriggeredDetails" 1964 | }, 1965 | "deployment": { 1966 | "$schema": "http://json-schema.org/draft-04/schema#", 1967 | "$ref": "#/definitions/TestTriggeredDeploymentDetails" 1968 | } 1969 | }, 1970 | "additionalProperties": false, 1971 | "type": "object" 1972 | } 1973 | } 1974 | } 1975 | ``` 1976 |

1977 |
1978 | 1979 | ##### Example Cloud Event 1980 | 1981 | ```json 1982 | { 1983 | "specversion": "1.0", 1984 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 1985 | "source": "source-service", 1986 | "type": "sh.keptn.event.test.triggered", 1987 | "datacontenttype": "application/json", 1988 | "data": { 1989 | "project": "sockshop", 1990 | "stage": "dev", 1991 | "service": "carts", 1992 | "labels": { 1993 | "label-key": "label-value" 1994 | }, 1995 | "status": "succeeded", 1996 | "result": "pass", 1997 | "message": "a message", 1998 | "test": { 1999 | "teststrategy": "functional" 2000 | }, 2001 | "deployment": { 2002 | "deploymentURIsLocal": [ 2003 | "http://carts.sockshop-staging.svc.cluster.local" 2004 | ], 2005 | "deploymentURIsPublic": [ 2006 | "http://carts.sockshot.local:80" 2007 | ] 2008 | } 2009 | }, 2010 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 2011 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 2012 | } 2013 | ``` 2014 | 2015 | ([↑ up to index](#keptn-cloud-events)) 2016 | #### Test Started 2017 | ##### Type 2018 | sh.keptn.event.test.started 2019 | ##### Data Json Schema 2020 | 2021 |
Json Schema of sh.keptn.event.test.started 2022 |

2023 | 2024 | ```json 2025 | { 2026 | "$schema": "http://json-schema.org/draft-04/schema#", 2027 | "$ref": "#/definitions/TestStartedEventData", 2028 | "definitions": { 2029 | "TestStartedEventData": { 2030 | "properties": { 2031 | "project": { 2032 | "type": "string" 2033 | }, 2034 | "stage": { 2035 | "type": "string" 2036 | }, 2037 | "service": { 2038 | "type": "string" 2039 | }, 2040 | "labels": { 2041 | "patternProperties": { 2042 | ".*": { 2043 | "type": "string" 2044 | } 2045 | }, 2046 | "type": "object" 2047 | }, 2048 | "status": { 2049 | "enum": [ 2050 | "succeeded", 2051 | "errored", 2052 | "unknown" 2053 | ], 2054 | "type": "string" 2055 | }, 2056 | "result": { 2057 | "enum": [ 2058 | "pass", 2059 | "warning", 2060 | "fail" 2061 | ], 2062 | "type": "string" 2063 | }, 2064 | "message": { 2065 | "type": "string" 2066 | } 2067 | }, 2068 | "additionalProperties": false, 2069 | "type": "object" 2070 | } 2071 | } 2072 | } 2073 | ``` 2074 |

2075 |
2076 | 2077 | ##### Example Cloud Event 2078 | 2079 | ```json 2080 | { 2081 | "specversion": "1.0", 2082 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 2083 | "source": "source-service", 2084 | "type": "sh.keptn.event.test.started", 2085 | "datacontenttype": "application/json", 2086 | "data": { 2087 | "project": "sockshop", 2088 | "stage": "dev", 2089 | "service": "carts", 2090 | "labels": { 2091 | "label-key": "label-value" 2092 | }, 2093 | "status": "succeeded", 2094 | "result": "pass", 2095 | "message": "a message" 2096 | }, 2097 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 2098 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 2099 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 2100 | } 2101 | ``` 2102 | 2103 | ([↑ up to index](#keptn-cloud-events)) 2104 | #### Test Status Changed 2105 | ##### Type 2106 | sh.keptn.event.test.triggered 2107 | ##### Data Json Schema 2108 | 2109 |
Json Schema of sh.keptn.event.test.triggered 2110 |

2111 | 2112 | ```json 2113 | { 2114 | "$schema": "http://json-schema.org/draft-04/schema#", 2115 | "$ref": "#/definitions/TestStatusChangedEventData", 2116 | "definitions": { 2117 | "TestStatusChangedEventData": { 2118 | "properties": { 2119 | "project": { 2120 | "type": "string" 2121 | }, 2122 | "stage": { 2123 | "type": "string" 2124 | }, 2125 | "service": { 2126 | "type": "string" 2127 | }, 2128 | "labels": { 2129 | "patternProperties": { 2130 | ".*": { 2131 | "type": "string" 2132 | } 2133 | }, 2134 | "type": "object" 2135 | }, 2136 | "status": { 2137 | "enum": [ 2138 | "succeeded", 2139 | "errored", 2140 | "unknown" 2141 | ], 2142 | "type": "string" 2143 | }, 2144 | "result": { 2145 | "enum": [ 2146 | "pass", 2147 | "warning", 2148 | "fail" 2149 | ], 2150 | "type": "string" 2151 | }, 2152 | "message": { 2153 | "type": "string" 2154 | } 2155 | }, 2156 | "additionalProperties": false, 2157 | "type": "object" 2158 | } 2159 | } 2160 | } 2161 | ``` 2162 |

2163 |
2164 | 2165 | ##### Example Cloud Event 2166 | 2167 | ```json 2168 | { 2169 | "specversion": "1.0", 2170 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 2171 | "source": "source-service", 2172 | "type": "sh.keptn.event.test.triggered", 2173 | "datacontenttype": "application/json", 2174 | "data": { 2175 | "project": "sockshop", 2176 | "stage": "dev", 2177 | "service": "carts", 2178 | "labels": { 2179 | "label-key": "label-value" 2180 | }, 2181 | "status": "succeeded", 2182 | "result": "pass", 2183 | "message": "a message" 2184 | }, 2185 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 2186 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 2187 | } 2188 | ``` 2189 | 2190 | ([↑ up to index](#keptn-cloud-events)) 2191 | #### Test Finished 2192 | ##### Type 2193 | sh.keptn.event.test.finished 2194 | ##### Data Json Schema 2195 | 2196 |
Json Schema of sh.keptn.event.test.finished 2197 |

2198 | 2199 | ```json 2200 | { 2201 | "$schema": "http://json-schema.org/draft-04/schema#", 2202 | "$ref": "#/definitions/TestFinishedEventData", 2203 | "definitions": { 2204 | "TestFinishedDetails": { 2205 | "required": [ 2206 | "start", 2207 | "end", 2208 | "gitCommit" 2209 | ], 2210 | "properties": { 2211 | "start": { 2212 | "type": "string" 2213 | }, 2214 | "end": { 2215 | "type": "string" 2216 | }, 2217 | "gitCommit": { 2218 | "type": "string" 2219 | } 2220 | }, 2221 | "additionalProperties": false, 2222 | "type": "object" 2223 | }, 2224 | "TestFinishedEventData": { 2225 | "required": [ 2226 | "test" 2227 | ], 2228 | "properties": { 2229 | "project": { 2230 | "type": "string" 2231 | }, 2232 | "stage": { 2233 | "type": "string" 2234 | }, 2235 | "service": { 2236 | "type": "string" 2237 | }, 2238 | "labels": { 2239 | "patternProperties": { 2240 | ".*": { 2241 | "type": "string" 2242 | } 2243 | }, 2244 | "type": "object" 2245 | }, 2246 | "status": { 2247 | "enum": [ 2248 | "succeeded", 2249 | "errored", 2250 | "unknown" 2251 | ], 2252 | "type": "string" 2253 | }, 2254 | "result": { 2255 | "enum": [ 2256 | "pass", 2257 | "warning", 2258 | "fail" 2259 | ], 2260 | "type": "string" 2261 | }, 2262 | "message": { 2263 | "type": "string" 2264 | }, 2265 | "test": { 2266 | "$schema": "http://json-schema.org/draft-04/schema#", 2267 | "$ref": "#/definitions/TestFinishedDetails" 2268 | } 2269 | }, 2270 | "additionalProperties": false, 2271 | "type": "object" 2272 | } 2273 | } 2274 | } 2275 | ``` 2276 |

2277 |
2278 | 2279 | ##### Example Cloud Event 2280 | 2281 | ```json 2282 | { 2283 | "specversion": "1.0", 2284 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 2285 | "source": "source-service", 2286 | "type": "sh.keptn.event.test.finished", 2287 | "datacontenttype": "application/json", 2288 | "data": { 2289 | "project": "sockshop", 2290 | "stage": "dev", 2291 | "service": "carts", 2292 | "labels": { 2293 | "label-key": "label-value" 2294 | }, 2295 | "status": "succeeded", 2296 | "result": "pass", 2297 | "message": "a message", 2298 | "test": { 2299 | "start": "2019-10-20T07:57:27.152330783Z", 2300 | "end": "2019-10-20T08:57:27.152330783Z", 2301 | "gitCommit": "ca82a6dff817gc66f44342007202690a93763949" 2302 | } 2303 | }, 2304 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 2305 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 2306 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 2307 | } 2308 | ``` 2309 | 2310 | ([↑ up to index](#keptn-cloud-events)) 2311 | ### Evaluation 2312 | #### Evaluation Triggered 2313 | ##### Type 2314 | sh.keptn.event.evaluation.triggered 2315 | ##### Data Json Schema 2316 | 2317 |
Json Schema of sh.keptn.event.evaluation.triggered 2318 |

2319 | 2320 | ```json 2321 | { 2322 | "$schema": "http://json-schema.org/draft-04/schema#", 2323 | "$ref": "#/definitions/EvaluationTriggeredEventData", 2324 | "definitions": { 2325 | "Deployment": { 2326 | "required": [ 2327 | "deploymentNames" 2328 | ], 2329 | "properties": { 2330 | "deploymentNames": { 2331 | "items": { 2332 | "type": "string" 2333 | }, 2334 | "type": "array" 2335 | } 2336 | }, 2337 | "additionalProperties": false, 2338 | "type": "object" 2339 | }, 2340 | "Evaluation": { 2341 | "required": [ 2342 | "start", 2343 | "end", 2344 | "timeframe" 2345 | ], 2346 | "properties": { 2347 | "start": { 2348 | "type": "string" 2349 | }, 2350 | "end": { 2351 | "type": "string" 2352 | }, 2353 | "timeframe": { 2354 | "type": "string" 2355 | } 2356 | }, 2357 | "additionalProperties": false, 2358 | "type": "object" 2359 | }, 2360 | "EvaluationTriggeredEventData": { 2361 | "required": [ 2362 | "test", 2363 | "evaluation", 2364 | "deployment" 2365 | ], 2366 | "properties": { 2367 | "project": { 2368 | "type": "string" 2369 | }, 2370 | "stage": { 2371 | "type": "string" 2372 | }, 2373 | "service": { 2374 | "type": "string" 2375 | }, 2376 | "labels": { 2377 | "patternProperties": { 2378 | ".*": { 2379 | "type": "string" 2380 | } 2381 | }, 2382 | "type": "object" 2383 | }, 2384 | "status": { 2385 | "enum": [ 2386 | "succeeded", 2387 | "errored", 2388 | "unknown" 2389 | ], 2390 | "type": "string" 2391 | }, 2392 | "result": { 2393 | "enum": [ 2394 | "pass", 2395 | "warning", 2396 | "fail" 2397 | ], 2398 | "type": "string" 2399 | }, 2400 | "message": { 2401 | "type": "string" 2402 | }, 2403 | "test": { 2404 | "$schema": "http://json-schema.org/draft-04/schema#", 2405 | "$ref": "#/definitions/Test" 2406 | }, 2407 | "evaluation": { 2408 | "$schema": "http://json-schema.org/draft-04/schema#", 2409 | "$ref": "#/definitions/Evaluation" 2410 | }, 2411 | "deployment": { 2412 | "$schema": "http://json-schema.org/draft-04/schema#", 2413 | "$ref": "#/definitions/Deployment" 2414 | } 2415 | }, 2416 | "additionalProperties": false, 2417 | "type": "object" 2418 | }, 2419 | "Test": { 2420 | "required": [ 2421 | "start", 2422 | "end" 2423 | ], 2424 | "properties": { 2425 | "start": { 2426 | "type": "string" 2427 | }, 2428 | "end": { 2429 | "type": "string" 2430 | } 2431 | }, 2432 | "additionalProperties": false, 2433 | "type": "object" 2434 | } 2435 | } 2436 | } 2437 | ``` 2438 |

2439 |
2440 | 2441 | ##### Example Cloud Event 2442 | 2443 | ```json 2444 | { 2445 | "specversion": "1.0", 2446 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 2447 | "source": "source-service", 2448 | "type": "sh.keptn.event.evaluation.triggered", 2449 | "datacontenttype": "application/json", 2450 | "data": { 2451 | "project": "sockshop", 2452 | "stage": "dev", 2453 | "service": "carts", 2454 | "labels": { 2455 | "label-key": "label-value" 2456 | }, 2457 | "status": "succeeded", 2458 | "result": "pass", 2459 | "message": "a message", 2460 | "test": { 2461 | "start": "2019-10-20T06:57:27.152330783Z", 2462 | "end": "2019-10-20T07:57:27.152330783Z" 2463 | }, 2464 | "evaluation": { 2465 | "start": "2019-10-20T07:57:27.152330783Z", 2466 | "end": "2019-10-20T08:57:27.152330783Z", 2467 | "timeframe": "10m" 2468 | }, 2469 | "deployment": { 2470 | "deploymentNames": [ 2471 | "deployment-1" 2472 | ] 2473 | } 2474 | }, 2475 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 2476 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 2477 | } 2478 | ``` 2479 | 2480 | ([↑ up to index](#keptn-cloud-events)) 2481 | #### Evaluation Started 2482 | ##### Type 2483 | sh.keptn.event.evaluation.started 2484 | ##### Data Json Schema 2485 | 2486 |
Json Schema of sh.keptn.event.evaluation.started 2487 |

2488 | 2489 | ```json 2490 | { 2491 | "$schema": "http://json-schema.org/draft-04/schema#", 2492 | "$ref": "#/definitions/EvaluationStartedEventData", 2493 | "definitions": { 2494 | "EvaluationStartedEventData": { 2495 | "properties": { 2496 | "project": { 2497 | "type": "string" 2498 | }, 2499 | "stage": { 2500 | "type": "string" 2501 | }, 2502 | "service": { 2503 | "type": "string" 2504 | }, 2505 | "labels": { 2506 | "patternProperties": { 2507 | ".*": { 2508 | "type": "string" 2509 | } 2510 | }, 2511 | "type": "object" 2512 | }, 2513 | "status": { 2514 | "enum": [ 2515 | "succeeded", 2516 | "errored", 2517 | "unknown" 2518 | ], 2519 | "type": "string" 2520 | }, 2521 | "result": { 2522 | "enum": [ 2523 | "pass", 2524 | "warning", 2525 | "fail" 2526 | ], 2527 | "type": "string" 2528 | }, 2529 | "message": { 2530 | "type": "string" 2531 | } 2532 | }, 2533 | "additionalProperties": false, 2534 | "type": "object" 2535 | } 2536 | } 2537 | } 2538 | ``` 2539 |

2540 |
2541 | 2542 | ##### Example Cloud Event 2543 | 2544 | ```json 2545 | { 2546 | "specversion": "1.0", 2547 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 2548 | "source": "source-service", 2549 | "type": "sh.keptn.event.evaluation.started", 2550 | "datacontenttype": "application/json", 2551 | "data": { 2552 | "project": "sockshop", 2553 | "stage": "dev", 2554 | "service": "carts", 2555 | "labels": { 2556 | "label-key": "label-value" 2557 | }, 2558 | "status": "succeeded", 2559 | "result": "pass", 2560 | "message": "a message" 2561 | }, 2562 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 2563 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 2564 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 2565 | } 2566 | ``` 2567 | 2568 | ([↑ up to index](#keptn-cloud-events)) 2569 | #### Evaluation Status Changed 2570 | ##### Type 2571 | sh.keptn.event.evaluation.status.changed 2572 | ##### Data Json Schema 2573 | 2574 |
Json Schema of sh.keptn.event.evaluation.status.changed 2575 |

2576 | 2577 | ```json 2578 | { 2579 | "$schema": "http://json-schema.org/draft-04/schema#", 2580 | "$ref": "#/definitions/EvaluationStatusChangedEventData", 2581 | "definitions": { 2582 | "EvaluationStatusChangedEventData": { 2583 | "properties": { 2584 | "project": { 2585 | "type": "string" 2586 | }, 2587 | "stage": { 2588 | "type": "string" 2589 | }, 2590 | "service": { 2591 | "type": "string" 2592 | }, 2593 | "labels": { 2594 | "patternProperties": { 2595 | ".*": { 2596 | "type": "string" 2597 | } 2598 | }, 2599 | "type": "object" 2600 | }, 2601 | "status": { 2602 | "enum": [ 2603 | "succeeded", 2604 | "errored", 2605 | "unknown" 2606 | ], 2607 | "type": "string" 2608 | }, 2609 | "result": { 2610 | "enum": [ 2611 | "pass", 2612 | "warning", 2613 | "fail" 2614 | ], 2615 | "type": "string" 2616 | }, 2617 | "message": { 2618 | "type": "string" 2619 | } 2620 | }, 2621 | "additionalProperties": false, 2622 | "type": "object" 2623 | } 2624 | } 2625 | } 2626 | ``` 2627 |

2628 |
2629 | 2630 | ##### Example Cloud Event 2631 | 2632 | ```json 2633 | { 2634 | "specversion": "1.0", 2635 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 2636 | "source": "source-service", 2637 | "type": "sh.keptn.event.evaluation.status.changed", 2638 | "datacontenttype": "application/json", 2639 | "data": { 2640 | "project": "sockshop", 2641 | "stage": "dev", 2642 | "service": "carts", 2643 | "labels": { 2644 | "label-key": "label-value" 2645 | }, 2646 | "status": "succeeded", 2647 | "result": "pass", 2648 | "message": "a message" 2649 | }, 2650 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 2651 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 2652 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 2653 | } 2654 | ``` 2655 | 2656 | ([↑ up to index](#keptn-cloud-events)) 2657 | #### Evaluation Finished 2658 | ##### Type 2659 | sh.keptn.event.evaluation.finished 2660 | ##### Data Json Schema 2661 | 2662 |
Json Schema of sh.keptn.event.evaluation.finished 2663 |

2664 | 2665 | ```json 2666 | { 2667 | "$schema": "http://json-schema.org/draft-04/schema#", 2668 | "$ref": "#/definitions/EvaluationFinishedEventData", 2669 | "definitions": { 2670 | "EvaluationDetails": { 2671 | "required": [ 2672 | "timeStart", 2673 | "timeEnd", 2674 | "result", 2675 | "score", 2676 | "sloFileContent", 2677 | "indicatorResults", 2678 | "gitCommit" 2679 | ], 2680 | "properties": { 2681 | "timeStart": { 2682 | "type": "string" 2683 | }, 2684 | "timeEnd": { 2685 | "type": "string" 2686 | }, 2687 | "result": { 2688 | "type": "string" 2689 | }, 2690 | "score": { 2691 | "type": "number" 2692 | }, 2693 | "sloFileContent": { 2694 | "type": "string" 2695 | }, 2696 | "indicatorResults": { 2697 | "items": { 2698 | "$schema": "http://json-schema.org/draft-04/schema#", 2699 | "$ref": "#/definitions/SLIEvaluationResult" 2700 | }, 2701 | "type": "array" 2702 | }, 2703 | "comparedEvents": { 2704 | "items": { 2705 | "type": "string" 2706 | }, 2707 | "type": "array" 2708 | }, 2709 | "gitCommit": { 2710 | "type": "string" 2711 | } 2712 | }, 2713 | "additionalProperties": false, 2714 | "type": "object" 2715 | }, 2716 | "EvaluationFinishedEventData": { 2717 | "properties": { 2718 | "project": { 2719 | "type": "string" 2720 | }, 2721 | "stage": { 2722 | "type": "string" 2723 | }, 2724 | "service": { 2725 | "type": "string" 2726 | }, 2727 | "labels": { 2728 | "patternProperties": { 2729 | ".*": { 2730 | "type": "string" 2731 | } 2732 | }, 2733 | "type": "object" 2734 | }, 2735 | "status": { 2736 | "enum": [ 2737 | "succeeded", 2738 | "errored", 2739 | "unknown" 2740 | ], 2741 | "type": "string" 2742 | }, 2743 | "result": { 2744 | "enum": [ 2745 | "pass", 2746 | "warning", 2747 | "fail" 2748 | ], 2749 | "type": "string" 2750 | }, 2751 | "message": { 2752 | "type": "string" 2753 | }, 2754 | "evaluation": { 2755 | "$schema": "http://json-schema.org/draft-04/schema#", 2756 | "$ref": "#/definitions/EvaluationDetails" 2757 | } 2758 | }, 2759 | "additionalProperties": false, 2760 | "type": "object" 2761 | }, 2762 | "SLIEvaluationResult": { 2763 | "required": [ 2764 | "score", 2765 | "value", 2766 | "displayName", 2767 | "passTargets", 2768 | "warningTargets", 2769 | "keySli", 2770 | "status" 2771 | ], 2772 | "properties": { 2773 | "score": { 2774 | "type": "number" 2775 | }, 2776 | "value": { 2777 | "$schema": "http://json-schema.org/draft-04/schema#", 2778 | "$ref": "#/definitions/SLIResult" 2779 | }, 2780 | "displayName": { 2781 | "type": "string" 2782 | }, 2783 | "passTargets": { 2784 | "items": { 2785 | "$schema": "http://json-schema.org/draft-04/schema#", 2786 | "$ref": "#/definitions/SLITarget" 2787 | }, 2788 | "type": "array" 2789 | }, 2790 | "warningTargets": { 2791 | "items": { 2792 | "$ref": "#/definitions/SLITarget" 2793 | }, 2794 | "type": "array" 2795 | }, 2796 | "keySli": { 2797 | "type": "boolean" 2798 | }, 2799 | "status": { 2800 | "enum": [ 2801 | "pass", 2802 | "warning", 2803 | "fail" 2804 | ], 2805 | "type": "string" 2806 | } 2807 | }, 2808 | "additionalProperties": false, 2809 | "type": "object" 2810 | }, 2811 | "SLIResult": { 2812 | "required": [ 2813 | "metric", 2814 | "value", 2815 | "success" 2816 | ], 2817 | "properties": { 2818 | "metric": { 2819 | "type": "string" 2820 | }, 2821 | "value": { 2822 | "type": "number" 2823 | }, 2824 | "success": { 2825 | "type": "boolean" 2826 | }, 2827 | "message": { 2828 | "type": "string" 2829 | } 2830 | }, 2831 | "additionalProperties": false, 2832 | "type": "object" 2833 | }, 2834 | "SLITarget": { 2835 | "required": [ 2836 | "criteria", 2837 | "targetValue", 2838 | "violated" 2839 | ], 2840 | "properties": { 2841 | "criteria": { 2842 | "type": "string" 2843 | }, 2844 | "targetValue": { 2845 | "type": "number" 2846 | }, 2847 | "violated": { 2848 | "type": "boolean" 2849 | } 2850 | }, 2851 | "additionalProperties": false, 2852 | "type": "object" 2853 | } 2854 | } 2855 | } 2856 | ``` 2857 |

2858 |
2859 | 2860 | ##### Example Cloud Event 2861 | 2862 | ```json 2863 | { 2864 | "specversion": "1.0", 2865 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 2866 | "source": "source-service", 2867 | "type": "sh.keptn.event.evaluation.finished", 2868 | "datacontenttype": "application/json", 2869 | "data": { 2870 | "project": "sockshop", 2871 | "stage": "dev", 2872 | "service": "carts", 2873 | "labels": { 2874 | "label-key": "label-value" 2875 | }, 2876 | "status": "succeeded", 2877 | "result": "pass", 2878 | "message": "a message", 2879 | "evaluation": { 2880 | "timeStart": "2019-11-18T11:21:06Z", 2881 | "timeEnd": "2019-11-18T11:29:36Z", 2882 | "result": "fail", 2883 | "score": 0, 2884 | "sloFileContent": "LS0tDQpzcGVjX3ZlcnNpb246ICcxLjAnDQpjb21wYXJpc29uOg0KICBjb21wYXJlX3dpdGg6ICJzaW5nbGVfcmVzdWx0Ig0KICBpbmNsdWRlX3Jlc3VsdF93aXRoX3Njb3JlOiAicGFzcyINCiAgYWdncmVnYXRlX2Z1bmN0aW9uOiBhdmcNCm9iamVjdGl2ZXM6DQogIC0gc2xpOiByZXNwb25zZV90aW1lX3A5NQ0KICAgIHBhc3M6ICAgICAgICAjIHBhc3MgaWYgKHJlbGF0aXZlIGNoYW5nZSA8PSAxMCUgQU5EIGFic29sdXRlIHZhbHVlIGlzIDwgNTAwKQ0KICAgICAgLSBjcml0ZXJpYToNCiAgICAgICAgICAtICI8PSsxMCUiICMgcmVsYXRpdmUgdmFsdWVzIHJlcXVpcmUgYSBwcmVmaXhlZCBzaWduIChwbHVzIG9yIG1pbnVzKQ0KICAgICAgICAgIC0gIjw2MDAiICAgIyBhYnNvbHV0ZSB2YWx1ZXMgb25seSByZXF1aXJlIGEgbG9naWNhbCBvcGVyYXRvcg0KICAgIHdhcm5pbmc6ICAgICAjIGlmIHRoZSByZXNwb25zZSB0aW1lIGlzIGJlbG93IDgwMG1zLCB0aGUgcmVzdWx0IHNob3VsZCBiZSBhIHdhcm5pbmcNCiAgICAgIC0gY3JpdGVyaWE6DQogICAgICAgICAgLSAiPD04MDAiDQp0b3RhbF9zY29yZToNCiAgcGFzczogIjkwJSINCiAgd2FybmluZzogNzUl", 2885 | "indicatorResults": [ 2886 | { 2887 | "score": 0, 2888 | "value": { 2889 | "metric": "response_time_p95", 2890 | "value": 1002.6278552658177, 2891 | "success": true, 2892 | "message": "a message" 2893 | }, 2894 | "displayName": "Response Time P95", 2895 | "passTargets": [ 2896 | { 2897 | "criteria": "\u003c=+10%", 2898 | "targetValue": 600, 2899 | "violated": true 2900 | } 2901 | ], 2902 | "warningTargets": [ 2903 | { 2904 | "criteria": "\u003c=+20%", 2905 | "targetValue": 800, 2906 | "violated": true 2907 | } 2908 | ], 2909 | "keySli": false, 2910 | "status": "failed" 2911 | } 2912 | ], 2913 | "comparedEvents": [ 2914 | "event-id-1", 2915 | "event-id-2" 2916 | ], 2917 | "gitCommit": "ca82a6dff817gc66f44342007202690a93763949" 2918 | } 2919 | }, 2920 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 2921 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 2922 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 2923 | } 2924 | ``` 2925 | 2926 | ([↑ up to index](#keptn-cloud-events)) 2927 | #### Evaluation Invalidated 2928 | ##### Type 2929 | sh.keptn.event.evaluation.invalidated 2930 | ##### Data Json Schema 2931 | 2932 |
Json Schema of sh.keptn.event.evaluation.invalidated 2933 |

2934 | 2935 | ```json 2936 | { 2937 | "$schema": "http://json-schema.org/draft-04/schema#", 2938 | "$ref": "#/definitions/EventData", 2939 | "definitions": { 2940 | "EventData": { 2941 | "properties": { 2942 | "project": { 2943 | "type": "string" 2944 | }, 2945 | "stage": { 2946 | "type": "string" 2947 | }, 2948 | "service": { 2949 | "type": "string" 2950 | }, 2951 | "labels": { 2952 | "patternProperties": { 2953 | ".*": { 2954 | "type": "string" 2955 | } 2956 | }, 2957 | "type": "object" 2958 | }, 2959 | "status": { 2960 | "enum": [ 2961 | "succeeded", 2962 | "errored", 2963 | "unknown" 2964 | ], 2965 | "type": "string" 2966 | }, 2967 | "result": { 2968 | "enum": [ 2969 | "pass", 2970 | "warning", 2971 | "fail" 2972 | ], 2973 | "type": "string" 2974 | }, 2975 | "message": { 2976 | "type": "string" 2977 | } 2978 | }, 2979 | "additionalProperties": false, 2980 | "type": "object" 2981 | } 2982 | } 2983 | } 2984 | ``` 2985 |

2986 |
2987 | 2988 | ##### Example Cloud Event 2989 | 2990 | ```json 2991 | { 2992 | "specversion": "1.0", 2993 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 2994 | "source": "source-service", 2995 | "type": "sh.keptn.event.evaluation.invalidated", 2996 | "datacontenttype": "application/json", 2997 | "data": { 2998 | "project": "sockshop", 2999 | "stage": "dev", 3000 | "service": "carts", 3001 | "labels": { 3002 | "label-key": "label-value" 3003 | }, 3004 | "status": "succeeded", 3005 | "result": "pass", 3006 | "message": "a message" 3007 | }, 3008 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3009 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 3010 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3011 | } 3012 | ``` 3013 | 3014 | ([↑ up to index](#keptn-cloud-events)) 3015 | ### Release 3016 | #### Release Triggered 3017 | ##### Type 3018 | sh.keptn.event.release.triggered 3019 | ##### Data Json Schema 3020 | 3021 |
Json Schema of sh.keptn.event.release.triggered 3022 |

3023 | 3024 | ```json 3025 | { 3026 | "$schema": "http://json-schema.org/draft-04/schema#", 3027 | "$ref": "#/definitions/ReleaseTriggeredEventData", 3028 | "definitions": { 3029 | "DeploymentFinishedData": { 3030 | "required": [ 3031 | "deploymentstrategy", 3032 | "deploymentURIsLocal", 3033 | "deploymentNames", 3034 | "gitCommit" 3035 | ], 3036 | "properties": { 3037 | "deploymentstrategy": { 3038 | "enum": [ 3039 | "direct", 3040 | "blue_green_service", 3041 | "user_managed" 3042 | ], 3043 | "type": "string" 3044 | }, 3045 | "deploymentURIsLocal": { 3046 | "items": { 3047 | "type": "string" 3048 | }, 3049 | "type": "array" 3050 | }, 3051 | "deploymentURIsPublic": { 3052 | "items": { 3053 | "type": "string" 3054 | }, 3055 | "type": "array" 3056 | }, 3057 | "deploymentNames": { 3058 | "items": { 3059 | "type": "string" 3060 | }, 3061 | "type": "array" 3062 | }, 3063 | "gitCommit": { 3064 | "type": "string" 3065 | } 3066 | }, 3067 | "additionalProperties": false, 3068 | "type": "object" 3069 | }, 3070 | "ReleaseTriggeredEventData": { 3071 | "required": [ 3072 | "deployment" 3073 | ], 3074 | "properties": { 3075 | "project": { 3076 | "type": "string" 3077 | }, 3078 | "stage": { 3079 | "type": "string" 3080 | }, 3081 | "service": { 3082 | "type": "string" 3083 | }, 3084 | "labels": { 3085 | "patternProperties": { 3086 | ".*": { 3087 | "type": "string" 3088 | } 3089 | }, 3090 | "type": "object" 3091 | }, 3092 | "status": { 3093 | "enum": [ 3094 | "succeeded", 3095 | "errored", 3096 | "unknown" 3097 | ], 3098 | "type": "string" 3099 | }, 3100 | "result": { 3101 | "enum": [ 3102 | "pass", 3103 | "warning", 3104 | "fail" 3105 | ], 3106 | "type": "string" 3107 | }, 3108 | "message": { 3109 | "type": "string" 3110 | }, 3111 | "deployment": { 3112 | "$schema": "http://json-schema.org/draft-04/schema#", 3113 | "$ref": "#/definitions/DeploymentFinishedData" 3114 | } 3115 | }, 3116 | "additionalProperties": false, 3117 | "type": "object" 3118 | } 3119 | } 3120 | } 3121 | ``` 3122 |

3123 |
3124 | 3125 | ##### Example Cloud Event 3126 | 3127 | ```json 3128 | { 3129 | "specversion": "1.0", 3130 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 3131 | "source": "source-service", 3132 | "type": "sh.keptn.event.release.triggered", 3133 | "datacontenttype": "application/json", 3134 | "data": { 3135 | "project": "sockshop", 3136 | "stage": "dev", 3137 | "service": "carts", 3138 | "labels": { 3139 | "label-key": "label-value" 3140 | }, 3141 | "status": "succeeded", 3142 | "result": "pass", 3143 | "message": "a message", 3144 | "deployment": { 3145 | "deploymentstrategy": "duplicate", 3146 | "deploymentURIsLocal": [ 3147 | "http://carts.sockshop-staging.svc.cluster.local" 3148 | ], 3149 | "deploymentURIsPublic": [ 3150 | "http://carts.sockshot.local:80" 3151 | ], 3152 | "deploymentNames": [ 3153 | "carts-primary", 3154 | "carts-generated" 3155 | ], 3156 | "gitCommit": "ca82a6dff817gc66f44342007202690a93763949" 3157 | } 3158 | }, 3159 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3160 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3161 | } 3162 | ``` 3163 | 3164 | ([↑ up to index](#keptn-cloud-events)) 3165 | #### Release Started 3166 | ##### Type 3167 | sh.keptn.event.release.started 3168 | ##### Data Json Schema 3169 | 3170 |
Json Schema of sh.keptn.event.release.started 3171 |

3172 | 3173 | ```json 3174 | { 3175 | "$schema": "http://json-schema.org/draft-04/schema#", 3176 | "$ref": "#/definitions/ReleaseStartedEventData", 3177 | "definitions": { 3178 | "ReleaseStartedEventData": { 3179 | "properties": { 3180 | "project": { 3181 | "type": "string" 3182 | }, 3183 | "stage": { 3184 | "type": "string" 3185 | }, 3186 | "service": { 3187 | "type": "string" 3188 | }, 3189 | "labels": { 3190 | "patternProperties": { 3191 | ".*": { 3192 | "type": "string" 3193 | } 3194 | }, 3195 | "type": "object" 3196 | }, 3197 | "status": { 3198 | "enum": [ 3199 | "succeeded", 3200 | "errored", 3201 | "unknown" 3202 | ], 3203 | "type": "string" 3204 | }, 3205 | "result": { 3206 | "enum": [ 3207 | "pass", 3208 | "warning", 3209 | "fail" 3210 | ], 3211 | "type": "string" 3212 | }, 3213 | "message": { 3214 | "type": "string" 3215 | } 3216 | }, 3217 | "additionalProperties": false, 3218 | "type": "object" 3219 | } 3220 | } 3221 | } 3222 | ``` 3223 |

3224 |
3225 | 3226 | ##### Example Cloud Event 3227 | 3228 | ```json 3229 | { 3230 | "specversion": "1.0", 3231 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 3232 | "source": "source-service", 3233 | "type": "sh.keptn.event.release.started", 3234 | "datacontenttype": "application/json", 3235 | "data": { 3236 | "project": "sockshop", 3237 | "stage": "dev", 3238 | "service": "carts", 3239 | "labels": { 3240 | "label-key": "label-value" 3241 | }, 3242 | "status": "succeeded", 3243 | "result": "pass", 3244 | "message": "a message" 3245 | }, 3246 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3247 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 3248 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3249 | } 3250 | ``` 3251 | 3252 | ([↑ up to index](#keptn-cloud-events)) 3253 | #### Release Status Changed 3254 | ##### Type 3255 | sh.keptn.event.release.status.changed 3256 | ##### Data Json Schema 3257 | 3258 |
Json Schema of sh.keptn.event.release.status.changed 3259 |

3260 | 3261 | ```json 3262 | { 3263 | "$schema": "http://json-schema.org/draft-04/schema#", 3264 | "$ref": "#/definitions/ReleaseStatusChangedEventData", 3265 | "definitions": { 3266 | "ReleaseStatusChangedEventData": { 3267 | "properties": { 3268 | "project": { 3269 | "type": "string" 3270 | }, 3271 | "stage": { 3272 | "type": "string" 3273 | }, 3274 | "service": { 3275 | "type": "string" 3276 | }, 3277 | "labels": { 3278 | "patternProperties": { 3279 | ".*": { 3280 | "type": "string" 3281 | } 3282 | }, 3283 | "type": "object" 3284 | }, 3285 | "status": { 3286 | "enum": [ 3287 | "succeeded", 3288 | "errored", 3289 | "unknown" 3290 | ], 3291 | "type": "string" 3292 | }, 3293 | "result": { 3294 | "enum": [ 3295 | "pass", 3296 | "warning", 3297 | "fail" 3298 | ], 3299 | "type": "string" 3300 | }, 3301 | "message": { 3302 | "type": "string" 3303 | } 3304 | }, 3305 | "additionalProperties": false, 3306 | "type": "object" 3307 | } 3308 | } 3309 | } 3310 | ``` 3311 |

3312 |
3313 | 3314 | ##### Example Cloud Event 3315 | 3316 | ```json 3317 | { 3318 | "specversion": "1.0", 3319 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 3320 | "source": "source-service", 3321 | "type": "sh.keptn.event.release.status.changed", 3322 | "datacontenttype": "application/json", 3323 | "data": { 3324 | "project": "sockshop", 3325 | "stage": "dev", 3326 | "service": "carts", 3327 | "labels": { 3328 | "label-key": "label-value" 3329 | }, 3330 | "status": "succeeded", 3331 | "result": "pass", 3332 | "message": "a message" 3333 | }, 3334 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3335 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 3336 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3337 | } 3338 | ``` 3339 | 3340 | ([↑ up to index](#keptn-cloud-events)) 3341 | #### Release Finished 3342 | ##### Type 3343 | sh.keptn.event.release.finished 3344 | ##### Data Json Schema 3345 | 3346 |
Json Schema of sh.keptn.event.release.finished 3347 |

3348 | 3349 | ```json 3350 | { 3351 | "$schema": "http://json-schema.org/draft-04/schema#", 3352 | "$ref": "#/definitions/ReleaseFinishedEventData", 3353 | "definitions": { 3354 | "ReleaseData": { 3355 | "required": [ 3356 | "gitCommit" 3357 | ], 3358 | "properties": { 3359 | "gitCommit": { 3360 | "type": "string" 3361 | } 3362 | }, 3363 | "additionalProperties": false, 3364 | "type": "object" 3365 | }, 3366 | "ReleaseFinishedEventData": { 3367 | "required": [ 3368 | "release" 3369 | ], 3370 | "properties": { 3371 | "project": { 3372 | "type": "string" 3373 | }, 3374 | "stage": { 3375 | "type": "string" 3376 | }, 3377 | "service": { 3378 | "type": "string" 3379 | }, 3380 | "labels": { 3381 | "patternProperties": { 3382 | ".*": { 3383 | "type": "string" 3384 | } 3385 | }, 3386 | "type": "object" 3387 | }, 3388 | "status": { 3389 | "enum": [ 3390 | "succeeded", 3391 | "errored", 3392 | "unknown" 3393 | ], 3394 | "type": "string" 3395 | }, 3396 | "result": { 3397 | "enum": [ 3398 | "pass", 3399 | "warning", 3400 | "fail" 3401 | ], 3402 | "type": "string" 3403 | }, 3404 | "message": { 3405 | "type": "string" 3406 | }, 3407 | "release": { 3408 | "$schema": "http://json-schema.org/draft-04/schema#", 3409 | "$ref": "#/definitions/ReleaseData" 3410 | } 3411 | }, 3412 | "additionalProperties": false, 3413 | "type": "object" 3414 | } 3415 | } 3416 | } 3417 | ``` 3418 |

3419 |
3420 | 3421 | ##### Example Cloud Event 3422 | 3423 | ```json 3424 | { 3425 | "specversion": "1.0", 3426 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 3427 | "source": "source-service", 3428 | "type": "sh.keptn.event.release.finished", 3429 | "datacontenttype": "application/json", 3430 | "data": { 3431 | "project": "sockshop", 3432 | "stage": "dev", 3433 | "service": "carts", 3434 | "labels": { 3435 | "label-key": "label-value" 3436 | }, 3437 | "status": "succeeded", 3438 | "result": "pass", 3439 | "message": "a message", 3440 | "release": { 3441 | "gitCommit": "ca82a6dff817gc66f44342007202690a93763949" 3442 | } 3443 | }, 3444 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3445 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 3446 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3447 | } 3448 | ``` 3449 | 3450 | ([↑ up to index](#keptn-cloud-events)) 3451 | ### Get Action 3452 | #### Get Action Triggered 3453 | ##### Type 3454 | sh.keptn.event.get-action.triggered 3455 | ##### Data Json Schema 3456 | 3457 |
Json Schema of sh.keptn.event.get-action.triggered 3458 |

3459 | 3460 | ```json 3461 | { 3462 | "$schema": "http://json-schema.org/draft-04/schema#", 3463 | "$ref": "#/definitions/GetActionTriggeredEventData", 3464 | "definitions": { 3465 | "GetActionTriggeredEventData": { 3466 | "required": [ 3467 | "problem", 3468 | "actionIndex" 3469 | ], 3470 | "properties": { 3471 | "project": { 3472 | "type": "string" 3473 | }, 3474 | "stage": { 3475 | "type": "string" 3476 | }, 3477 | "service": { 3478 | "type": "string" 3479 | }, 3480 | "labels": { 3481 | "patternProperties": { 3482 | ".*": { 3483 | "type": "string" 3484 | } 3485 | }, 3486 | "type": "object" 3487 | }, 3488 | "status": { 3489 | "enum": [ 3490 | "succeeded", 3491 | "errored", 3492 | "unknown" 3493 | ], 3494 | "type": "string" 3495 | }, 3496 | "result": { 3497 | "enum": [ 3498 | "pass", 3499 | "warning", 3500 | "fail" 3501 | ], 3502 | "type": "string" 3503 | }, 3504 | "message": { 3505 | "type": "string" 3506 | }, 3507 | "problem": { 3508 | "$schema": "http://json-schema.org/draft-04/schema#", 3509 | "$ref": "#/definitions/ProblemDetails" 3510 | }, 3511 | "actionIndex": { 3512 | "type": "integer" 3513 | } 3514 | }, 3515 | "additionalProperties": false, 3516 | "type": "object" 3517 | }, 3518 | "ProblemDetails": { 3519 | "required": [ 3520 | "problemTitle", 3521 | "rootCause" 3522 | ], 3523 | "properties": { 3524 | "problemTitle": { 3525 | "type": "string" 3526 | }, 3527 | "rootCause": { 3528 | "type": "string" 3529 | } 3530 | }, 3531 | "additionalProperties": false, 3532 | "type": "object" 3533 | } 3534 | } 3535 | } 3536 | ``` 3537 |

3538 |
3539 | 3540 | ##### Example Cloud Event 3541 | 3542 | ```json 3543 | { 3544 | "specversion": "1.0", 3545 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 3546 | "source": "source-service", 3547 | "type": "sh.keptn.event.get-action.triggered", 3548 | "datacontenttype": "application/json", 3549 | "data": { 3550 | "project": "sockshop", 3551 | "stage": "dev", 3552 | "service": "carts", 3553 | "labels": { 3554 | "label-key": "label-value" 3555 | }, 3556 | "status": "succeeded", 3557 | "result": "pass", 3558 | "message": "a message", 3559 | "problem": { 3560 | "problemTitle": "Response time degradation", 3561 | "rootCause": "Problem root cause" 3562 | }, 3563 | "actionIndex": 0 3564 | }, 3565 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3566 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3567 | } 3568 | ``` 3569 | 3570 | ([↑ up to index](#keptn-cloud-events)) 3571 | #### Get Action Started 3572 | ##### Type 3573 | sh.keptn.event.get-action.started 3574 | ##### Data Json Schema 3575 | 3576 |
Json Schema of sh.keptn.event.get-action.started 3577 |

3578 | 3579 | ```json 3580 | { 3581 | "$schema": "http://json-schema.org/draft-04/schema#", 3582 | "$ref": "#/definitions/GetActionStartedEventData", 3583 | "definitions": { 3584 | "GetActionStartedEventData": { 3585 | "properties": { 3586 | "project": { 3587 | "type": "string" 3588 | }, 3589 | "stage": { 3590 | "type": "string" 3591 | }, 3592 | "service": { 3593 | "type": "string" 3594 | }, 3595 | "labels": { 3596 | "patternProperties": { 3597 | ".*": { 3598 | "type": "string" 3599 | } 3600 | }, 3601 | "type": "object" 3602 | }, 3603 | "status": { 3604 | "enum": [ 3605 | "succeeded", 3606 | "errored", 3607 | "unknown" 3608 | ], 3609 | "type": "string" 3610 | }, 3611 | "result": { 3612 | "enum": [ 3613 | "pass", 3614 | "warning", 3615 | "fail" 3616 | ], 3617 | "type": "string" 3618 | }, 3619 | "message": { 3620 | "type": "string" 3621 | } 3622 | }, 3623 | "additionalProperties": false, 3624 | "type": "object" 3625 | } 3626 | } 3627 | } 3628 | ``` 3629 |

3630 |
3631 | 3632 | ##### Example Cloud Event 3633 | 3634 | ```json 3635 | { 3636 | "specversion": "1.0", 3637 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 3638 | "source": "source-service", 3639 | "type": "sh.keptn.event.get-action.started", 3640 | "datacontenttype": "application/json", 3641 | "data": { 3642 | "project": "sockshop", 3643 | "stage": "dev", 3644 | "service": "carts", 3645 | "labels": { 3646 | "label-key": "label-value" 3647 | }, 3648 | "status": "succeeded", 3649 | "result": "pass", 3650 | "message": "a message" 3651 | }, 3652 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3653 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 3654 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3655 | } 3656 | ``` 3657 | 3658 | ([↑ up to index](#keptn-cloud-events)) 3659 | #### Get Action Finished 3660 | ##### Type 3661 | sh.keptn.event.get-action.finished 3662 | ##### Data Json Schema 3663 | 3664 |
Json Schema of sh.keptn.event.get-action.finished 3665 |

3666 | 3667 | ```json 3668 | { 3669 | "$schema": "http://json-schema.org/draft-04/schema#", 3670 | "$ref": "#/definitions/GetActionFinishedEventData", 3671 | "definitions": { 3672 | "ActionInfo": { 3673 | "required": [ 3674 | "name", 3675 | "action" 3676 | ], 3677 | "properties": { 3678 | "name": { 3679 | "type": "string" 3680 | }, 3681 | "action": { 3682 | "type": "string" 3683 | }, 3684 | "description": { 3685 | "type": "string" 3686 | }, 3687 | "value": { 3688 | "additionalProperties": true 3689 | } 3690 | }, 3691 | "additionalProperties": false, 3692 | "type": "object" 3693 | }, 3694 | "GetActionFinishedEventData": { 3695 | "required": [ 3696 | "action", 3697 | "ActionIndex" 3698 | ], 3699 | "properties": { 3700 | "project": { 3701 | "type": "string" 3702 | }, 3703 | "stage": { 3704 | "type": "string" 3705 | }, 3706 | "service": { 3707 | "type": "string" 3708 | }, 3709 | "labels": { 3710 | "patternProperties": { 3711 | ".*": { 3712 | "type": "string" 3713 | } 3714 | }, 3715 | "type": "object" 3716 | }, 3717 | "status": { 3718 | "enum": [ 3719 | "succeeded", 3720 | "errored", 3721 | "unknown" 3722 | ], 3723 | "type": "string" 3724 | }, 3725 | "result": { 3726 | "enum": [ 3727 | "pass", 3728 | "warning", 3729 | "fail" 3730 | ], 3731 | "type": "string" 3732 | }, 3733 | "message": { 3734 | "type": "string" 3735 | }, 3736 | "action": { 3737 | "$schema": "http://json-schema.org/draft-04/schema#", 3738 | "$ref": "#/definitions/ActionInfo" 3739 | }, 3740 | "ActionIndex": { 3741 | "type": "integer" 3742 | } 3743 | }, 3744 | "additionalProperties": false, 3745 | "type": "object" 3746 | } 3747 | } 3748 | } 3749 | ``` 3750 |

3751 |
3752 | 3753 | ##### Example Cloud Event 3754 | 3755 | ```json 3756 | { 3757 | "specversion": "1.0", 3758 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 3759 | "source": "source-service", 3760 | "type": "sh.keptn.event.get-action.finished", 3761 | "datacontenttype": "application/json", 3762 | "data": { 3763 | "project": "sockshop", 3764 | "stage": "dev", 3765 | "service": "carts", 3766 | "labels": { 3767 | "label-key": "label-value" 3768 | }, 3769 | "status": "succeeded", 3770 | "result": "pass", 3771 | "message": "a message", 3772 | "action": { 3773 | "name": "Feature toggling", 3774 | "action": "toggle-feature", 3775 | "description": "Toggles a feature flag", 3776 | "value": { 3777 | "EnableItemCache": "on" 3778 | } 3779 | }, 3780 | "ActionIndex": 1 3781 | }, 3782 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3783 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 3784 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3785 | } 3786 | ``` 3787 | 3788 | ([↑ up to index](#keptn-cloud-events)) 3789 | ### Action 3790 | #### Action Triggered 3791 | ##### Type 3792 | sh.keptn.event.action.triggered 3793 | ##### Data Json Schema 3794 | 3795 |
Json Schema of sh.keptn.event.action.triggered 3796 |

3797 | 3798 | ```json 3799 | { 3800 | "$schema": "http://json-schema.org/draft-04/schema#", 3801 | "$ref": "#/definitions/ActionTriggeredEventData", 3802 | "definitions": { 3803 | "ActionInfo": { 3804 | "required": [ 3805 | "name", 3806 | "action" 3807 | ], 3808 | "properties": { 3809 | "name": { 3810 | "type": "string" 3811 | }, 3812 | "action": { 3813 | "type": "string" 3814 | }, 3815 | "description": { 3816 | "type": "string" 3817 | }, 3818 | "value": { 3819 | "additionalProperties": true 3820 | } 3821 | }, 3822 | "additionalProperties": false, 3823 | "type": "object" 3824 | }, 3825 | "ActionTriggeredEventData": { 3826 | "required": [ 3827 | "action", 3828 | "problem" 3829 | ], 3830 | "properties": { 3831 | "project": { 3832 | "type": "string" 3833 | }, 3834 | "stage": { 3835 | "type": "string" 3836 | }, 3837 | "service": { 3838 | "type": "string" 3839 | }, 3840 | "labels": { 3841 | "patternProperties": { 3842 | ".*": { 3843 | "type": "string" 3844 | } 3845 | }, 3846 | "type": "object" 3847 | }, 3848 | "status": { 3849 | "enum": [ 3850 | "succeeded", 3851 | "errored", 3852 | "unknown" 3853 | ], 3854 | "type": "string" 3855 | }, 3856 | "result": { 3857 | "enum": [ 3858 | "pass", 3859 | "warning", 3860 | "fail" 3861 | ], 3862 | "type": "string" 3863 | }, 3864 | "message": { 3865 | "type": "string" 3866 | }, 3867 | "action": { 3868 | "$schema": "http://json-schema.org/draft-04/schema#", 3869 | "$ref": "#/definitions/ActionInfo" 3870 | }, 3871 | "problem": { 3872 | "$schema": "http://json-schema.org/draft-04/schema#", 3873 | "$ref": "#/definitions/ProblemDetails" 3874 | } 3875 | }, 3876 | "additionalProperties": false, 3877 | "type": "object" 3878 | }, 3879 | "ProblemDetails": { 3880 | "required": [ 3881 | "problemTitle", 3882 | "rootCause" 3883 | ], 3884 | "properties": { 3885 | "problemTitle": { 3886 | "type": "string" 3887 | }, 3888 | "rootCause": { 3889 | "type": "string" 3890 | } 3891 | }, 3892 | "additionalProperties": false, 3893 | "type": "object" 3894 | } 3895 | } 3896 | } 3897 | ``` 3898 |

3899 |
3900 | 3901 | ##### Example Cloud Event 3902 | 3903 | ```json 3904 | { 3905 | "specversion": "1.0", 3906 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 3907 | "source": "source-service", 3908 | "type": "sh.keptn.event.action.triggered", 3909 | "datacontenttype": "application/json", 3910 | "data": { 3911 | "project": "sockshop", 3912 | "stage": "dev", 3913 | "service": "carts", 3914 | "labels": { 3915 | "label-key": "label-value" 3916 | }, 3917 | "status": "succeeded", 3918 | "result": "pass", 3919 | "message": "a message", 3920 | "action": { 3921 | "name": "Feature toggling", 3922 | "action": "toggle-feature", 3923 | "description": "Toggles a feature flag", 3924 | "value": { 3925 | "EnableItemCache": "on" 3926 | } 3927 | }, 3928 | "problem": { 3929 | "problemTitle": "cpu_usage_sockshop_carts", 3930 | "rootCause": "problem root cause" 3931 | } 3932 | }, 3933 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 3934 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 3935 | } 3936 | ``` 3937 | 3938 | ([↑ up to index](#keptn-cloud-events)) 3939 | #### Action Started 3940 | ##### Type 3941 | sh.keptn.event.action.started 3942 | ##### Data Json Schema 3943 | 3944 |
Json Schema of sh.keptn.event.action.started 3945 |

3946 | 3947 | ```json 3948 | { 3949 | "$schema": "http://json-schema.org/draft-04/schema#", 3950 | "$ref": "#/definitions/ActionStartedEventData", 3951 | "definitions": { 3952 | "ActionStartedEventData": { 3953 | "properties": { 3954 | "project": { 3955 | "type": "string" 3956 | }, 3957 | "stage": { 3958 | "type": "string" 3959 | }, 3960 | "service": { 3961 | "type": "string" 3962 | }, 3963 | "labels": { 3964 | "patternProperties": { 3965 | ".*": { 3966 | "type": "string" 3967 | } 3968 | }, 3969 | "type": "object" 3970 | }, 3971 | "status": { 3972 | "enum": [ 3973 | "succeeded", 3974 | "errored", 3975 | "unknown" 3976 | ], 3977 | "type": "string" 3978 | }, 3979 | "result": { 3980 | "enum": [ 3981 | "pass", 3982 | "warning", 3983 | "fail" 3984 | ], 3985 | "type": "string" 3986 | }, 3987 | "message": { 3988 | "type": "string" 3989 | } 3990 | }, 3991 | "additionalProperties": false, 3992 | "type": "object" 3993 | } 3994 | } 3995 | } 3996 | ``` 3997 |

3998 |
3999 | 4000 | ##### Example Cloud Event 4001 | 4002 | ```json 4003 | { 4004 | "specversion": "1.0", 4005 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 4006 | "source": "source-service", 4007 | "type": "sh.keptn.event.action.started", 4008 | "datacontenttype": "application/json", 4009 | "data": { 4010 | "project": "sockshop", 4011 | "stage": "dev", 4012 | "service": "carts", 4013 | "labels": { 4014 | "label-key": "label-value" 4015 | }, 4016 | "status": "succeeded", 4017 | "result": "pass", 4018 | "message": "a message" 4019 | }, 4020 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 4021 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 4022 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 4023 | } 4024 | ``` 4025 | 4026 | ([↑ up to index](#keptn-cloud-events)) 4027 | #### Action Finished 4028 | ##### Type 4029 | sh.keptn.event.action.finished 4030 | ##### Data Json Schema 4031 | 4032 |
Json Schema of sh.keptn.event.action.finished 4033 |

4034 | 4035 | ```json 4036 | { 4037 | "$schema": "http://json-schema.org/draft-04/schema#", 4038 | "$ref": "#/definitions/ActionFinishedEventData", 4039 | "definitions": { 4040 | "ActionData": { 4041 | "properties": { 4042 | "gitCommit": { 4043 | "type": "string" 4044 | } 4045 | }, 4046 | "additionalProperties": false, 4047 | "type": "object" 4048 | }, 4049 | "ActionFinishedEventData": { 4050 | "required": [ 4051 | "action" 4052 | ], 4053 | "properties": { 4054 | "project": { 4055 | "type": "string" 4056 | }, 4057 | "stage": { 4058 | "type": "string" 4059 | }, 4060 | "service": { 4061 | "type": "string" 4062 | }, 4063 | "labels": { 4064 | "patternProperties": { 4065 | ".*": { 4066 | "type": "string" 4067 | } 4068 | }, 4069 | "type": "object" 4070 | }, 4071 | "status": { 4072 | "enum": [ 4073 | "succeeded", 4074 | "errored", 4075 | "unknown" 4076 | ], 4077 | "type": "string" 4078 | }, 4079 | "result": { 4080 | "enum": [ 4081 | "pass", 4082 | "warning", 4083 | "fail" 4084 | ], 4085 | "type": "string" 4086 | }, 4087 | "message": { 4088 | "type": "string" 4089 | }, 4090 | "action": { 4091 | "$schema": "http://json-schema.org/draft-04/schema#", 4092 | "$ref": "#/definitions/ActionData" 4093 | } 4094 | }, 4095 | "additionalProperties": false, 4096 | "type": "object" 4097 | } 4098 | } 4099 | } 4100 | ``` 4101 |

4102 |
4103 | 4104 | ##### Example Cloud Event 4105 | 4106 | ```json 4107 | { 4108 | "specversion": "1.0", 4109 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 4110 | "source": "source-service", 4111 | "type": "sh.keptn.event.action.finished", 4112 | "datacontenttype": "application/json", 4113 | "data": { 4114 | "project": "sockshop", 4115 | "stage": "dev", 4116 | "service": "carts", 4117 | "labels": { 4118 | "label-key": "label-value" 4119 | }, 4120 | "status": "succeeded", 4121 | "result": "pass", 4122 | "message": "a message", 4123 | "action": { 4124 | "gitCommit": "93a5-3fas-a09d-8ckf" 4125 | } 4126 | }, 4127 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 4128 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 4129 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 4130 | } 4131 | ``` 4132 | 4133 | ([↑ up to index](#keptn-cloud-events)) 4134 | ### Get SLI 4135 | #### Get SLI Triggered 4136 | ##### Type 4137 | sh.keptn.event.get-sli.triggered 4138 | ##### Data Json Schema 4139 | 4140 |
Json Schema of sh.keptn.event.get-sli.triggered 4141 |

4142 | 4143 | ```json 4144 | { 4145 | "$schema": "http://json-schema.org/draft-04/schema#", 4146 | "$ref": "#/definitions/GetSLITriggeredEventData", 4147 | "definitions": { 4148 | "GetSLI": { 4149 | "required": [ 4150 | "sliProvider", 4151 | "start", 4152 | "end" 4153 | ], 4154 | "properties": { 4155 | "sliProvider": { 4156 | "type": "string" 4157 | }, 4158 | "start": { 4159 | "type": "string" 4160 | }, 4161 | "end": { 4162 | "type": "string" 4163 | }, 4164 | "indicators": { 4165 | "items": { 4166 | "type": "string" 4167 | }, 4168 | "type": "array" 4169 | }, 4170 | "customFilters": { 4171 | "items": { 4172 | "$schema": "http://json-schema.org/draft-04/schema#", 4173 | "$ref": "#/definitions/SLIFilter" 4174 | }, 4175 | "type": "array" 4176 | } 4177 | }, 4178 | "additionalProperties": false, 4179 | "type": "object" 4180 | }, 4181 | "GetSLITriggeredEventData": { 4182 | "required": [ 4183 | "get-sli", 4184 | "deployment" 4185 | ], 4186 | "properties": { 4187 | "project": { 4188 | "type": "string" 4189 | }, 4190 | "stage": { 4191 | "type": "string" 4192 | }, 4193 | "service": { 4194 | "type": "string" 4195 | }, 4196 | "labels": { 4197 | "patternProperties": { 4198 | ".*": { 4199 | "type": "string" 4200 | } 4201 | }, 4202 | "type": "object" 4203 | }, 4204 | "status": { 4205 | "enum": [ 4206 | "succeeded", 4207 | "errored", 4208 | "unknown" 4209 | ], 4210 | "type": "string" 4211 | }, 4212 | "result": { 4213 | "enum": [ 4214 | "pass", 4215 | "warning", 4216 | "fail" 4217 | ], 4218 | "type": "string" 4219 | }, 4220 | "message": { 4221 | "type": "string" 4222 | }, 4223 | "get-sli": { 4224 | "$schema": "http://json-schema.org/draft-04/schema#", 4225 | "$ref": "#/definitions/GetSLI" 4226 | }, 4227 | "deployment": { 4228 | "type": "string" 4229 | } 4230 | }, 4231 | "additionalProperties": false, 4232 | "type": "object" 4233 | }, 4234 | "SLIFilter": { 4235 | "required": [ 4236 | "key", 4237 | "value" 4238 | ], 4239 | "properties": { 4240 | "key": { 4241 | "type": "string" 4242 | }, 4243 | "value": { 4244 | "type": "string" 4245 | } 4246 | }, 4247 | "additionalProperties": false, 4248 | "type": "object" 4249 | } 4250 | } 4251 | } 4252 | ``` 4253 |

4254 |
4255 | 4256 | ##### Example Cloud Event 4257 | 4258 | ```json 4259 | { 4260 | "specversion": "1.0", 4261 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 4262 | "source": "source-service", 4263 | "type": "sh.keptn.event.get-sli.triggered", 4264 | "datacontenttype": "application/json", 4265 | "data": { 4266 | "project": "sockshop", 4267 | "stage": "dev", 4268 | "service": "carts", 4269 | "labels": { 4270 | "label-key": "label-value" 4271 | }, 4272 | "status": "succeeded", 4273 | "result": "pass", 4274 | "message": "a message", 4275 | "get-sli": { 4276 | "sliProvider": "dynatrace", 4277 | "start": "2019-10-28T15:44:27.152330783Z", 4278 | "end": "2019-10-28T15:54:27.152330783Z", 4279 | "indicators": [ 4280 | "throughput", 4281 | "error_rate", 4282 | "request_latency_p95" 4283 | ], 4284 | "customFilters": [ 4285 | { 4286 | "key": "dynatraceEntityName", 4287 | "value": "HealthCheckController" 4288 | }, 4289 | { 4290 | "key": "tags", 4291 | "value": "test-subject:true" 4292 | } 4293 | ] 4294 | }, 4295 | "deployment": "direct" 4296 | }, 4297 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 4298 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 4299 | } 4300 | ``` 4301 | 4302 | ([↑ up to index](#keptn-cloud-events)) 4303 | #### Get SLI Started 4304 | ##### Type 4305 | sh.keptn.event.get-sli.started 4306 | ##### Data Json Schema 4307 | 4308 |
Json Schema of sh.keptn.event.get-sli.started 4309 |

4310 | 4311 | ```json 4312 | { 4313 | "$schema": "http://json-schema.org/draft-04/schema#", 4314 | "$ref": "#/definitions/GetSLIStartedEventData", 4315 | "definitions": { 4316 | "GetSLIStartedEventData": { 4317 | "properties": { 4318 | "project": { 4319 | "type": "string" 4320 | }, 4321 | "stage": { 4322 | "type": "string" 4323 | }, 4324 | "service": { 4325 | "type": "string" 4326 | }, 4327 | "labels": { 4328 | "patternProperties": { 4329 | ".*": { 4330 | "type": "string" 4331 | } 4332 | }, 4333 | "type": "object" 4334 | }, 4335 | "status": { 4336 | "enum": [ 4337 | "succeeded", 4338 | "errored", 4339 | "unknown" 4340 | ], 4341 | "type": "string" 4342 | }, 4343 | "result": { 4344 | "enum": [ 4345 | "pass", 4346 | "warning", 4347 | "fail" 4348 | ], 4349 | "type": "string" 4350 | }, 4351 | "message": { 4352 | "type": "string" 4353 | } 4354 | }, 4355 | "additionalProperties": false, 4356 | "type": "object" 4357 | } 4358 | } 4359 | } 4360 | ``` 4361 |

4362 |
4363 | 4364 | ##### Example Cloud Event 4365 | 4366 | ```json 4367 | { 4368 | "specversion": "1.0", 4369 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 4370 | "source": "source-service", 4371 | "type": "sh.keptn.event.get-sli.started", 4372 | "datacontenttype": "application/json", 4373 | "data": { 4374 | "project": "sockshop", 4375 | "stage": "dev", 4376 | "service": "carts", 4377 | "labels": { 4378 | "label-key": "label-value" 4379 | }, 4380 | "status": "succeeded", 4381 | "result": "pass", 4382 | "message": "a message" 4383 | }, 4384 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 4385 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 4386 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 4387 | } 4388 | ``` 4389 | 4390 | ([↑ up to index](#keptn-cloud-events)) 4391 | #### Get SLI Finished 4392 | ##### Type 4393 | sh.keptn.event.get-sli.finished 4394 | ##### Data Json Schema 4395 | 4396 |
Json Schema of sh.keptn.event.get-sli.finished 4397 |

4398 | 4399 | ```json 4400 | { 4401 | "$schema": "http://json-schema.org/draft-04/schema#", 4402 | "$ref": "#/definitions/GetSLIFinishedEventData", 4403 | "definitions": { 4404 | "GetSLIFinished": { 4405 | "required": [ 4406 | "start", 4407 | "end" 4408 | ], 4409 | "properties": { 4410 | "start": { 4411 | "type": "string" 4412 | }, 4413 | "end": { 4414 | "type": "string" 4415 | }, 4416 | "indicatorValues": { 4417 | "items": { 4418 | "$schema": "http://json-schema.org/draft-04/schema#", 4419 | "$ref": "#/definitions/SLIResult" 4420 | }, 4421 | "type": "array" 4422 | } 4423 | }, 4424 | "additionalProperties": false, 4425 | "type": "object" 4426 | }, 4427 | "GetSLIFinishedEventData": { 4428 | "required": [ 4429 | "get-sli" 4430 | ], 4431 | "properties": { 4432 | "project": { 4433 | "type": "string" 4434 | }, 4435 | "stage": { 4436 | "type": "string" 4437 | }, 4438 | "service": { 4439 | "type": "string" 4440 | }, 4441 | "labels": { 4442 | "patternProperties": { 4443 | ".*": { 4444 | "type": "string" 4445 | } 4446 | }, 4447 | "type": "object" 4448 | }, 4449 | "status": { 4450 | "enum": [ 4451 | "succeeded", 4452 | "errored", 4453 | "unknown" 4454 | ], 4455 | "type": "string" 4456 | }, 4457 | "result": { 4458 | "enum": [ 4459 | "pass", 4460 | "warning", 4461 | "fail" 4462 | ], 4463 | "type": "string" 4464 | }, 4465 | "message": { 4466 | "type": "string" 4467 | }, 4468 | "get-sli": { 4469 | "$schema": "http://json-schema.org/draft-04/schema#", 4470 | "$ref": "#/definitions/GetSLIFinished" 4471 | } 4472 | }, 4473 | "additionalProperties": false, 4474 | "type": "object" 4475 | }, 4476 | "SLIResult": { 4477 | "required": [ 4478 | "metric", 4479 | "value", 4480 | "success" 4481 | ], 4482 | "properties": { 4483 | "metric": { 4484 | "type": "string" 4485 | }, 4486 | "value": { 4487 | "type": "number" 4488 | }, 4489 | "success": { 4490 | "type": "boolean" 4491 | }, 4492 | "message": { 4493 | "type": "string" 4494 | } 4495 | }, 4496 | "additionalProperties": false, 4497 | "type": "object" 4498 | } 4499 | } 4500 | } 4501 | ``` 4502 |

4503 |
4504 | 4505 | ##### Example Cloud Event 4506 | 4507 | ```json 4508 | { 4509 | "specversion": "1.0", 4510 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 4511 | "source": "source-service", 4512 | "type": "sh.keptn.event.get-sli.finished", 4513 | "datacontenttype": "application/json", 4514 | "data": { 4515 | "project": "sockshop", 4516 | "stage": "dev", 4517 | "service": "carts", 4518 | "get-sli": { 4519 | "start": "2019-10-20T07:57:27.152330783Z", 4520 | "end": "2019-10-22T08:57:27.152330783Z", 4521 | "indicatorValues": [ 4522 | { 4523 | "metric": "response_time_p50", 4524 | "value": 1011.0745528937252, 4525 | "success": true 4526 | } 4527 | ] 4528 | } 4529 | }, 4530 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 4531 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 4532 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 4533 | } 4534 | ``` 4535 | 4536 | ([↑ up to index](#keptn-cloud-events)) 4537 | ### Monitoring 4538 | #### Configure Monitoring 4539 | ##### Type 4540 | sh.keptn.event.monitoring.configure 4541 | ##### Data Json Schema 4542 | 4543 |
Json Schema of sh.keptn.event.monitoring.configure 4544 |

4545 | 4546 | ```json 4547 | { 4548 | "$schema": "http://json-schema.org/draft-04/schema#", 4549 | "$ref": "#/definitions/ConfigureMonitoringEventData", 4550 | "definitions": { 4551 | "ConfigureMonitoringEventData": { 4552 | "required": [ 4553 | "type", 4554 | "project", 4555 | "service" 4556 | ], 4557 | "properties": { 4558 | "type": { 4559 | "type": "string" 4560 | }, 4561 | "project": { 4562 | "type": "string" 4563 | }, 4564 | "service": { 4565 | "type": "string" 4566 | } 4567 | }, 4568 | "additionalProperties": false, 4569 | "type": "object" 4570 | } 4571 | } 4572 | } 4573 | ``` 4574 |

4575 |
4576 | 4577 | ##### Example Cloud Event 4578 | 4579 | ```json 4580 | { 4581 | "specversion": "1.0", 4582 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 4583 | "source": "source-service", 4584 | "type": "sh.keptn.event.monitoring.configure", 4585 | "datacontenttype": "application/json", 4586 | "data": { 4587 | "type": "dynatrace", 4588 | "project": "sockshop", 4589 | "service": "service" 4590 | }, 4591 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 4592 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 4593 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 4594 | } 4595 | ``` 4596 | 4597 | ([↑ up to index](#keptn-cloud-events)) 4598 | ### Problem 4599 | #### Problem 4600 | ##### Type 4601 | sh.keptn.events.problem 4602 | ##### Data Json Schema 4603 | 4604 |
Json Schema of sh.keptn.events.problem 4605 |

4606 | 4607 | ```json 4608 | { 4609 | "$schema": "http://json-schema.org/draft-04/schema#", 4610 | "$ref": "#/definitions/ProblemEventData", 4611 | "definitions": { 4612 | "ProblemEventData": { 4613 | "required": [ 4614 | "ProblemID", 4615 | "ProblemTitle", 4616 | "ProblemDetails", 4617 | "PID", 4618 | "labels" 4619 | ], 4620 | "properties": { 4621 | "State": { 4622 | "type": "string" 4623 | }, 4624 | "ProblemID": { 4625 | "type": "string" 4626 | }, 4627 | "ProblemTitle": { 4628 | "type": "string" 4629 | }, 4630 | "ProblemDetails": { 4631 | "type": "string", 4632 | "media": { 4633 | "binaryEncoding": "base64" 4634 | } 4635 | }, 4636 | "PID": { 4637 | "type": "string" 4638 | }, 4639 | "ProblemURL": { 4640 | "type": "string" 4641 | }, 4642 | "ImpactedEntity": { 4643 | "type": "string" 4644 | }, 4645 | "Tags": { 4646 | "type": "string" 4647 | }, 4648 | "project": { 4649 | "type": "string" 4650 | }, 4651 | "stage": { 4652 | "type": "string" 4653 | }, 4654 | "service": { 4655 | "type": "string" 4656 | }, 4657 | "labels": { 4658 | "patternProperties": { 4659 | ".*": { 4660 | "type": "string" 4661 | } 4662 | }, 4663 | "type": "object" 4664 | } 4665 | }, 4666 | "additionalProperties": false, 4667 | "type": "object" 4668 | } 4669 | } 4670 | } 4671 | ``` 4672 |

4673 |
4674 | 4675 | ##### Example Cloud Event 4676 | 4677 | ```json 4678 | { 4679 | "specversion": "1.0", 4680 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 4681 | "source": "source-service", 4682 | "type": "sh.keptn.events.problem", 4683 | "datacontenttype": "application/json", 4684 | "data": { 4685 | "State": "OPEN", 4686 | "ProblemID": "ab81-941c-f198", 4687 | "ProblemTitle": "Response Time Degradation", 4688 | "ProblemDetails": { 4689 | "displayName": "641", 4690 | "endTime": -1, 4691 | "hasRootCause": false, 4692 | "id": "1234_5678V2", 4693 | "impactLevel": "SERVICE", 4694 | "severityLevel": "PERFORMANCE", 4695 | "startTime": 1587624420000, 4696 | "status": "OPEN" 4697 | }, 4698 | "PID": "93a5-3fas-a09d-8ckf", 4699 | "ProblemURL": "https://.../#problems/problemdetails;pid=93a5-3fas-a09d-8ckf", 4700 | "ImpactedEntity": "carts-primary", 4701 | "project": "sockshop", 4702 | "stage": "production", 4703 | "service": "service", 4704 | "labels": null 4705 | }, 4706 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 4707 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 4708 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 4709 | } 4710 | ``` 4711 | 4712 | ([↑ up to index](#keptn-cloud-events)) 4713 | ### General purpose events 4714 | In addition to the task sequence/task events listed above, Keptn also supports the following general-purpose events: 4715 | ### Logging 4716 | For easier debugging of errors that occur either during the execution of a task of a sequence, or while performing any other operation, Keptn integration services can send error log events to the Keptn API via the distributor. 4717 | #### Error Log 4718 | ##### Type 4719 | sh.keptn.log.error 4720 | ##### Data Json Schema 4721 | 4722 |
Json Schema of sh.keptn.log.error 4723 |

4724 | 4725 | ```json 4726 | { 4727 | "$schema": "http://json-schema.org/draft-04/schema#", 4728 | "$ref": "#/definitions/ErrorLogEvent", 4729 | "definitions": { 4730 | "ErrorLogEvent": { 4731 | "required": [ 4732 | "message", 4733 | "integrationid", 4734 | "task" 4735 | ], 4736 | "properties": { 4737 | "message": { 4738 | "type": "string" 4739 | }, 4740 | "integrationid": { 4741 | "type": "string" 4742 | }, 4743 | "task": { 4744 | "type": "string" 4745 | } 4746 | }, 4747 | "additionalProperties": false, 4748 | "type": "object" 4749 | } 4750 | } 4751 | } 4752 | ``` 4753 |

4754 |
4755 | 4756 | ##### Example Cloud Event 4757 | 4758 | ```json 4759 | { 4760 | "specversion": "1.0", 4761 | "id": "c4d3a334-6cb9-4e8c-a372-7e0b45942f53", 4762 | "source": "source-service", 4763 | "type": "sh.keptn.log.error", 4764 | "datacontenttype": "application/json", 4765 | "data": { 4766 | "message": "an unexpected error occurred", 4767 | "integrationid": "2b4b199c-cdaf-11eb-b8bc-0242ac130003", 4768 | "task": "deployment" 4769 | }, 4770 | "shkeptncontext": "a3e5f16d-8888-4720-82c7-6995062905c1", 4771 | "triggeredid": "3f9640b6-1d2a-4f11-95f5-23259f1d82d6", 4772 | "gitcommitid": "521747298a3790fde1710f3aa2d03b55020575aa" 4773 | } 4774 | ``` 4775 | 4776 | ([↑ up to index](#keptn-cloud-events)) 4777 | 4778 | -------------------------------------------------------------------------------- /import_package.md: -------------------------------------------------------------------------------- 1 | # Import package 2 | 3 | An import package is a .zip file that contains a **manifest.yaml** that describes additional 4 | contents and actions to be performed when processing the package, in addition, all files 5 | referenced within the manifest must be included in the .zip file. 6 | 7 | ## Meta-data 8 | 9 | * `apiVersion` is set to `v1beta1` 10 | 11 | ## Tasks 12 | 13 | * `tasks`: list of api actions and resource tasks. 14 | * `id`: unique identifier of the task. Must contain only upper-case, 15 | lower-case letters, digits or underscores (`[A-Za-z0-9_]+`) 16 | * `type`: Must be either **api** or **resource**. All required properties of the specified 17 | type have to be implemented. 18 | * `name` *(optional)*: A human readable name for the action to easier identify the action 19 | * `context` *(optional)*: An optional context which can contain additional data for the 20 | API action or resource task. A context must only contain string values and supports templating. 21 | 22 | ### API action 23 | An API action is a task that interacts with a specific Keptn API endpoint. The JSON results of the endpoint 24 | are stored in ` .Tasks..Response.` and are accessible for all following tasks. The following 25 | properties have to be implemented by an API action: 26 | * `action`: The name of the Keptn API endpoint to call. 27 | See [Supported API endpoints](#supported-api-endpoints) for more information. 28 | * `payload`: A reference to a file that should be used as body payload for the API action. 29 | If the action does not take a body, this property is ignored. The file reference has to be 30 | specified as the relative path within the provided import package. 31 | 32 | ### Resource task 33 | A resource task adds resources to Keptn. This task is similar to the Keptn CLI 34 | [add-resource](https://keptn.sh/docs/0.18.x/reference/cli/commands/keptn_add-resource/) argument. 35 | Similar to API actions, resources are also 36 | processed by the Golang templating engine. The following properties have to be defined for a resource task: 37 | * `resource`: A reference (relative file path) to a file in the import package 38 | * `resourceUri`: The URI at which the file should be stored in Keptn 39 | * `stage` *(optional)*: An optional stage name that can be specified 40 | * `service` *(optional)*: An optional service that can be specified, if specified `stage` has to be non-empty 41 | 42 | ## Supported API endpoints 43 | If not mentioned otherwise, all payloads support templating and all given properties of the `context` object 44 | can be used in the payload. For more details see the [Templating](#templating) Section. 45 | The following API actions are supported: 46 | 47 | `keptn-api-v1-create-service`: Create a service 48 | ```json 49 | { 50 | "serviceName": "[[ .Context.service ]]" 51 | } 52 | ``` 53 | 54 | `keptn-api-v1-uniform-create-secret`: Create a secret 55 | ```json 56 | { 57 | "scope":"[[ .Context.scope ]]", 58 | "data":{ 59 | "token":"[[ .Context.token ]]" 60 | }, 61 | "name":"[[ .Context.name ]]" 62 | } 63 | ``` 64 | 65 | `keptn-api-v1-uniform-create-webhook-subscription`: Create a webhook subscription 66 | ```json 67 | { 68 | "event": "[[ .Context.event ]]", 69 | "filter": { 70 | "projects": ["[[ .Context.project ]]"], 71 | "services": ["[[ .Context.service ]]"], 72 | "stages": ["[[ .Context.stage ]]"] 73 | } 74 | } 75 | ``` 76 | 77 | ## Templating 78 | If not mentioned otherwise all string values of the `context` property in a **task** can be used with the 79 | templating syntax of the Golang templating engine. We use `[[` and `]]` as separator. 80 | 81 | ### Global Inputs 82 | The following inputs are currently available to be used in all places that support templating: 83 | * `[[ .Inputs.project ]]`: Will be rendered to the current project name 84 | 85 | ### Tasks references 86 | After a task has been processed, it exposes its response and the already fully rendered context via the 87 | following properties: 88 | * `[[ .Tasks..Context. ]]`: Can be used to access the rendered context property of 89 | a given task with the `id`. 90 | * `[[ .Tasks..Response. ]]`: Each **API action** provides the response of the action 91 | the **Response** object. All JSON fields of the response can be accessed via their respective names. 92 | 93 | ### Resource files 94 | In resource files only properties of the task **context** can be utilized and accessed via 95 | `[[ .Context. ]]`. 96 | 97 | # Specification 98 | ```json 99 | { 100 | "definitions": { 101 | "Task": { 102 | "required": [ 103 | "id", 104 | "type" 105 | ], 106 | "properties": { 107 | "id": { 108 | "type": "string", 109 | "pattern": "[A-Za-z0-9_]+" 110 | }, 111 | "type": { 112 | "type": "string", 113 | "enum": [ 114 | "api", 115 | "resource" 116 | ] 117 | }, 118 | "name": { 119 | "type": "string" 120 | }, 121 | "context": { 122 | "type": "object", 123 | "patternProperties": { 124 | "^.*$": { 125 | "type": "string" 126 | } 127 | } 128 | } 129 | } 130 | }, 131 | "APIAction": { 132 | "$ref": "#/definitions/Task", 133 | "required": [ 134 | "action", 135 | "payload" 136 | ], 137 | "properties": { 138 | "type": { 139 | "const": "api" 140 | }, 141 | "action": { 142 | "type": "string", 143 | "enum": [ 144 | "keptn-api-v1-create-service", 145 | "keptn-api-v1-uniform-create-secret", 146 | "keptn-api-v1-uniform-create-webhook-subscription" 147 | ] 148 | }, 149 | "payload": { 150 | "type": "string" 151 | } 152 | } 153 | }, 154 | "ResourceTask": { 155 | "$ref": "#/definitions/Task", 156 | "required": [ 157 | "resource", 158 | "resourceUri", 159 | ], 160 | "properties": { 161 | "type": { 162 | "const": "resource" 163 | }, 164 | "resource": { 165 | "type": "string" 166 | }, 167 | "resourceUri": { 168 | "type": "string" 169 | }, 170 | "stage": { 171 | "type": "string", 172 | "pattern": "[a-z0-9_-]+" 173 | }, 174 | "service": { 175 | "type": "string", 176 | "pattern": "[a-z0-9_-]+" 177 | } 178 | } 179 | }, 180 | }, 181 | "required": [ 182 | "apiVersion" 183 | ], 184 | "properties": { 185 | "apiVersion": { 186 | "const": "v1beta1" 187 | }, 188 | "tasks": { 189 | "type": "array", 190 | "items": { 191 | "oneOf": [ 192 | { 193 | "$ref": "#/definitions/APIAction" 194 | }, 195 | { 196 | "$ref": "#/definitions/ResourceTask" 197 | } 198 | ] 199 | } 200 | } 201 | } 202 | } 203 | ``` 204 | 205 | # Example 206 | The following example contains the contents of an import package to create a service with 207 | a webhook subscription for a given project. In addition to the payload files from the [](#supported-api-endpoints) 208 | section, the **manifest.yaml** and **webhook.yaml** files have are also used to produce 209 | the following ZIP-archive: 210 | ``` 211 | . 212 | ├── api 213 | │   ├── create-secret.json 214 | │   ├── create-service.json 215 | │   └── create-subscription.json 216 | ├── manifest.yaml 217 | ├── resources 218 | │   └── webhook.yaml 219 | └── shipyard.yaml 220 | ``` 221 | 222 | **manifest.yaml**: 223 | ```yaml 224 | apiVersion: v1beta1 225 | tasks: 226 | # Create a service 227 | - name: "Create service" 228 | id: create_service 229 | type: api 230 | action: "keptn-api-v1-create-service" # Pre-defined endpoint types (we only support a few) 231 | payload: "api/create-service.json" # JSON file which contains the not validated payload 232 | context: # context available for templating in the payload 233 | service: "my-service-name" # Can also use go template syntax: [[ .Struct.field ]] 234 | 235 | # Create a secret which we will later use in webhook 236 | - name: "Create secret" 237 | id: create_secret 238 | type: api 239 | payload: "api/create-secret.json" 240 | action: "keptn-api-v1-uniform-create-secret" 241 | 242 | # Create a subscription 243 | # Internally this figures out the current webhook integration id 244 | # and saves the response into .Tasks..Response.id 245 | - name: "Create webhook subscription" 246 | type: api 247 | id: create_subscription 248 | payload: "api/create-subscription.json" 249 | action: "keptn-api-v1-uniform-create-webhook-subscription" 250 | context: 251 | event: "sh.keptn.event.evaluation.triggered" 252 | project: "[[ .Inputs.project ]]" 253 | stage: "dev" 254 | service: "[[ .Tasks.create_service.Content.service ]]" 255 | 256 | # Add a webhook config 257 | - name: "Webhook config" 258 | id: add_webhook_config 259 | type: resource 260 | resource: "resources/webhook.yaml" # where is the file stored in the package 261 | resourceUri: "webhook.yaml" # what should the file be called in the upstream repo 262 | stage: "[[ .Tasks.create_subscription.Content.stage ]]" 263 | context: # Placeholders for templating in resources/webhook.yaml 264 | event: "[[ .Tasks.create_subscription.Context.event ]]" 265 | project: "[[ .Tasks.create_subscription.Context.project ]]" 266 | subscriptionId: "[[ .Tasks.create_subscription.Response.id ]]" 267 | ``` 268 | 269 | **webhook.yaml**: 270 | ```yaml 271 | apiVersion: webhookconfig.keptn.sh/v1alpha1 272 | kind: WebhookConfig 273 | metadata: 274 | name: webhook-configuration 275 | spec: 276 | webhooks: 277 | - type: [[ .Context.event ]] 278 | requests: 279 | - curl --request POST https://slack.com/api/[[ .Context.project ]]/{{ .secret.slack-webhook.token }} 280 | subscriptionID: [[ .Context.subscriptionId ]] 281 | sendFinished: true 282 | ``` 283 | -------------------------------------------------------------------------------- /remediation.md: -------------------------------------------------------------------------------- 1 | # Remediation 2 | 3 | * The *Remediation* defines remediation actions to execute in response to a problem. 4 | * This configuration is interpreted by Keptn to trigger the proper remediation actions. 5 | 6 | The *problem type* maps a problem to a remediation by a matching problem title (implemented as string match). 7 | * It is possible to declare multiple problem types for a remediation. 8 | * For the case of triggering a remediation based on an unknown problem, the problem type `default` is supported. 9 | 10 | ## Meta-data 11 | 12 | * `apiVersion`: The version of the Remediation specification in the format: `spec.keptn.sh/x.y.z` 13 | * `kind`: is `Remediation` 14 | * `metadata`: Contains at least the property name, which declares a unique name for the Remediation. 15 | * `spec`: Consists of the property remediations. 16 | * `remediations`: An array of remediations triggered in response to a problem. 17 | 18 | ## Remediation 19 | 20 | A Remediation consisits of a list of remediations. A remediation has the properties: 21 | 22 | * `problemType`: Maps a problem to a remediation by a matching problem title (implemented as string match). 23 | * `actionsOnOpen`: Declares a list of actions triggered in course of the remediation. 24 | 25 | ## Action 26 | 27 | A remediation consists of a list of actions. An action has the properties: 28 | 29 | * `name`: A name used for display purposes. 30 | * `action`: A unique name required by the action-provider (Keptn-service) that executes the action. 31 | * `description`: Provides more details about the action. 32 | * `value`: Allows adding an arbitrary list of values for configuring the action. 33 | 34 | # Specification 35 | 36 | ```json 37 | "Remediation": { 38 | "required": [ 39 | "apiVersion", 40 | "kind", 41 | "metadata", 42 | "spec" 43 | ], 44 | "properties": { 45 | "apiVersion": { 46 | "type": "string" 47 | }, 48 | "kind": { 49 | "type": "string" 50 | }, 51 | "metadata": { 52 | "required": [ 53 | "name" 54 | ], 55 | "properties": { 56 | "name": { 57 | "type": "string" 58 | } 59 | }, 60 | "additionalProperties": false, 61 | "type": "object" 62 | }, 63 | "spec": { 64 | "$ref": "#/definitions/Spec" 65 | }, 66 | }, 67 | "additionalProperties": false, 68 | "type": "object" 69 | }, 70 | 71 | "Spec": { 72 | "required": [ 73 | "remediations" 74 | ], 75 | "properties": { 76 | "remediations": { 77 | "items": { 78 | "$ref": "#/definitions/Remediation" 79 | }, 80 | "type": "array" 81 | }, 82 | }, 83 | "additionalProperties": false, 84 | "type": "object" 85 | }, 86 | 87 | "Remediation": { 88 | "required": [ 89 | "actionsOnOpen", 90 | "problemType" 91 | ], 92 | "properties": { 93 | "actionsOnOpen": { 94 | "items": { 95 | "$ref": "#/definitions/Action" 96 | }, 97 | "type": "array" 98 | }, 99 | "problemType": { 100 | "type": "string" 101 | } 102 | }, 103 | "additionalProperties": false, 104 | "type": "object" 105 | } 106 | 107 | "Action": { 108 | "required": [ 109 | "action", 110 | "description", 111 | "name", 112 | "value" 113 | ], 114 | "properties": { 115 | "action": { 116 | "type": "string" 117 | }, 118 | "description": { 119 | "type": "string" 120 | }, 121 | "name": { 122 | "type": "string" 123 | }, 124 | "value": { 125 | "type": ["object", "string"] 126 | } 127 | }, 128 | "additionalProperties": false, 129 | "type": "object" 130 | } 131 | ``` 132 | 133 | # Example of a Remediation (in yaml) 134 | 135 | ```yaml 136 | apiVersion: spec.keptn.sh/0.1.4 137 | kind: Remediation 138 | metadata: 139 | name: remediation-configuration 140 | spec: 141 | remediations: 142 | - problemType: "Response time degradation" 143 | actionsOnOpen: 144 | - name: Toogle feature flag 145 | action: togglefeature 146 | description: Toggle feature flag EnablePromotion from ON to OFF 147 | value: 148 | EnablePromotion: off 149 | - problemType: "default" 150 | actionsOnOpen: 151 | - name: Escalate problem 152 | action: escalate 153 | description: Escalate the problem using a SlackBot 154 | value: 155 | ``` 156 | 157 | ([↑ up to index](#specifications-for-site-reliability-engineering-with-keptn)) 158 | -------------------------------------------------------------------------------- /schemas/shipyard.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/schema#", 3 | "$ref": "#/definitions/Shipyard", 4 | "definitions": { 5 | "Metadata": { 6 | "required": ["name"], 7 | "properties": { 8 | "name": { 9 | "type": "string" 10 | } 11 | }, 12 | "additionalProperties": false, 13 | "type": "object" 14 | }, 15 | "Selector": { 16 | "required": ["match"], 17 | "properties": { 18 | "match": { 19 | "patternProperties": { 20 | ".*": { 21 | "type": "string" 22 | } 23 | }, 24 | "type": "object", 25 | "additionalProperties": false 26 | } 27 | }, 28 | "additionalProperties": false, 29 | "type": "object" 30 | }, 31 | "Sequence": { 32 | "required": ["name", "tasks"], 33 | "properties": { 34 | "name": { 35 | "type": "string" 36 | }, 37 | "triggeredOn": { 38 | "items": { 39 | "$schema": "http://json-schema.org/draft-04/schema#", 40 | "$ref": "#/definitions/Trigger" 41 | }, 42 | "type": "array" 43 | }, 44 | "tasks": { 45 | "items": { 46 | "$schema": "http://json-schema.org/draft-04/schema#", 47 | "$ref": "#/definitions/Task" 48 | }, 49 | "type": "array" 50 | } 51 | }, 52 | "additionalProperties": false, 53 | "type": "object" 54 | }, 55 | "Shipyard": { 56 | "required": ["apiVersion", "kind", "metadata", "spec"], 57 | "properties": { 58 | "apiVersion": { 59 | "type": "string" 60 | }, 61 | "kind": { 62 | "type": "string" 63 | }, 64 | "metadata": { 65 | "$schema": "http://json-schema.org/draft-04/schema#", 66 | "$ref": "#/definitions/Metadata" 67 | }, 68 | "spec": { 69 | "$schema": "http://json-schema.org/draft-04/schema#", 70 | "$ref": "#/definitions/ShipyardSpec" 71 | } 72 | }, 73 | "additionalProperties": false, 74 | "type": "object" 75 | }, 76 | "ShipyardSpec": { 77 | "required": ["stages"], 78 | "properties": { 79 | "stages": { 80 | "items": { 81 | "$schema": "http://json-schema.org/draft-04/schema#", 82 | "$ref": "#/definitions/Stage" 83 | }, 84 | "type": "array" 85 | } 86 | }, 87 | "additionalProperties": false, 88 | "type": "object" 89 | }, 90 | "Stage": { 91 | "required": ["name", "sequences"], 92 | "properties": { 93 | "name": { 94 | "type": "string" 95 | }, 96 | "sequences": { 97 | "items": { 98 | "$schema": "http://json-schema.org/draft-04/schema#", 99 | "$ref": "#/definitions/Sequence" 100 | }, 101 | "type": "array" 102 | } 103 | }, 104 | "additionalProperties": false, 105 | "type": "object" 106 | }, 107 | "Task": { 108 | "required": ["name"], 109 | "properties": { 110 | "name": { 111 | "type": "string" 112 | }, 113 | "triggeredAfter": { 114 | "type": "string" 115 | }, 116 | "properties": { 117 | "type": "object", 118 | "additionalProperties": true 119 | } 120 | }, 121 | "additionalProperties": false, 122 | "type": "object" 123 | }, 124 | "Trigger": { 125 | "required": ["event"], 126 | "properties": { 127 | "event": { 128 | "type": "string" 129 | }, 130 | "selector": { 131 | "$schema": "http://json-schema.org/draft-04/schema#", 132 | "$ref": "#/definitions/Selector" 133 | } 134 | }, 135 | "additionalProperties": false, 136 | "type": "object" 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /service_level_indicator.md: -------------------------------------------------------------------------------- 1 | # Service Level Indicators (SLI) 2 | 3 | * A *Service Level Indicator* (SLI) is a defined quantitative measure of some aspects of the service level. 4 | * The query for an SLI is provider (tool) dependent. This is the reason why each SLI-provider relies on an individual SLI configuration. 5 | * A SLI configuration lists those SLIs that are supported by the SLI-provider by their name and query whereas the query is provider specific. 6 | 7 | ## Meta-data 8 | 9 | * `spec_version`: is set to `1.0` 10 | 11 | ## Indicators 12 | 13 | * `indicators`: A map of key-value pairs with the SLI name as key and the provider-specific query as value. 14 | 15 | # Specification 16 | 17 | ```json 18 | "ServiceLevelIndicators": { 19 | "required": [ 20 | "indicators", 21 | "spec_version" 22 | ], 23 | "properties": { 24 | "indicators": { 25 | "patternProperties": { 26 | ".*": { 27 | "type": "string" 28 | } 29 | }, 30 | "type": "object" 31 | }, 32 | "spec_version": { 33 | "type": "string" 34 | } 35 | }, 36 | "additionalProperties": false, 37 | "type": "object" 38 | } 39 | ``` 40 | 41 | # Example of a Service Level Indicators (SLI) configuration (in yaml) 42 | 43 | ```yaml 44 | spec_version: "1.0" 45 | indicators: 46 | throughput: "builtin:service.requestCount.total:merge(0):count?scope=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),tag(keptn_deployment:$DEPLOYMENT)" 47 | error_rate: "builtin:service.errors.total.count:merge(0):avg?scope=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),tag(keptn_deployment:$DEPLOYMENT)" 48 | response_time_p50: "builtin:service.response.time:merge(0):percentile(50)?scope=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),tag(keptn_deployment:$DEPLOYMENT)" 49 | response_time_p90: "builtin:service.response.time:merge(0):percentile(90)?scope=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),tag(keptn_deployment:$DEPLOYMENT)" 50 | response_time_p95: "builtin:service.response.time:merge(0):percentile(95)?scope=tag(keptn_project:$PROJECT),tag(keptn_stage:$STAGE),tag(keptn_service:$SERVICE),tag(keptn_deployment:$DEPLOYMENT)" 51 | ``` -------------------------------------------------------------------------------- /service_level_objective.md: -------------------------------------------------------------------------------- 1 | # Service Level Objectives (SLO) 2 | 3 | * The *Service Level Objective* (SLO) specifies a target value or range of values for a service level that is measured by Service Level Indicators (SLIs). 4 | * An SLO is defined per service and consists of a filter that uniquely identifies a deployment of a service, and objectives that depend on the selected comparison strategy. 5 | 6 | ## Meta-data 7 | 8 | * `spec_version`: is set to `1.0` 9 | 10 | ## Filter 11 | 12 | * `filter`: Declares a list of key-value pairs that are used to uniquely identify a deployment of a service. This means that the key of a filter can be used as a placeholder in an SLI query. For example, the filter `svc_id: "a14b-cd87-0d51"` specifies a unique identifier of the deployment of a service. Consequently, the key of the filter (i.e., `svc_id`) can be referenced in an SLI query by `$svc_id`. The filters *project*, *stage*, *service*, and *deployment* can be inferred from the Keptn configuration by using `$PROJECT`, `$STAGE`, `$SERVICE`, and `$DEPLOYMENT` in SLI queries respectively. These values can also be overwritten in the configuration. The default filters are: 13 | * project 14 | * stage 15 | * service 16 | * deployment 17 | 18 | *Example of an SLO with a list of filters:* 19 | ```yaml 20 | spec_version: '1.0' 21 | filter: 22 | mz_id: "4711" 23 | svc_id: "a14b-cd87-0d51" 24 | comparison: 25 | ... 26 | ``` 27 | 28 | *Example of an SLI with reference to the `mz_id` filter from the SLO:* 29 | ```yaml 30 | spec_version: "1.0" 31 | indicators: 32 | throughput: "builtin:service.requestCount.total:merge(0):count?scope=tag(keptn_service:$SERVICE),mzId($mz_id)" 33 | ``` 34 | 35 | ## Comparison 36 | 37 | * `comparison`: This property allows configuring the used comparison strategy. By default, Keptn compares with the previous evaluation regardless of its score. This comparison strategy can be configured with: 38 | * `compare_with`: Defines how many previous results are considered for the comparision: *single_result* or *several_results* (*single_result* is the default and is used if not specified). 39 | * `include_result_with_score`: Controls which of the previous evaluations are included in the comparison. Therefore, this property accepts the values: *pass*, *pass_or_warn*, or *all* (*all* is the default and is used if not specified), which target the overall evaluation result and not the single SLI evaluation. In other words, the overall evaluation result decides whether SLI values are considered for the comparison or not. 40 | * `number_of_comparison_results`: Defines the exact number of previous results to consider (1 is the default and is used if not specified). 41 | * `aggregate_function` *(optional)*: Allows overriding the default aggregation function which is `avg`. 42 | 43 | *1. Example:* 44 | 45 | ```yaml 46 | comparison: 47 | compare_with: "single_result" 48 | include_result_with_score: "pass" 49 | aggregate_function: avg 50 | ``` 51 | This comparison configuration means that the current result is only compared to the last result that passed. 52 | 53 | > **Note:** If you configure `compare_with: "single_result"` in combination with **number_of_comparison_results**, **compare_with** will negate the **number_of_comparison_results**. 54 | 55 | *2. Example:* 56 | 57 | ```yaml 58 | comparison: 59 | compare_with: "several_results" 60 | number_of_comparison_results: 3 61 | include_result_with_score: "pass_or_warn" 62 | aggregate_function: "avg" 63 | ``` 64 | 65 | This comparison configuration means that the current result is compared to the average of the three previous results that had pass or warning as a result. 66 | 67 | ## Objectives 68 | 69 | * `objectives`: Defines a list of objectives whereas an objective consists of a **sli** name, an optional **displayName**, a **pass** criteria, an optional **warning** criteria, an optional **weight** criteria and an optional **key_sli** flag. 70 | * `sli`: Refers to the name of the SLI. 71 | * `displayName` *(optional)*: Display name for the SLI. 72 | * `pass`: Represents the upper limit up to which an evaluation is successful. 73 | * `warning` *(optional)*: Describes the border where the result is not pass and not fail, and a manual approval might be needed to decide. 74 | * `weight` *(optional)*: Can be used to emphasize the importance of one SLI over the others. By default, `weight` is 1 for all SLIs and can be overwritten. The weight is important for calculating the score later. 75 | * `key_sli` *(optional)*: Can be set to true meaning that the objective is not met if this SLI fails. 76 | 77 | The following example demonstrates how the objectives work. Assume the following comparison strategy and SLI objective. 78 | 79 | ```yaml 80 | objectives: 81 | - sli: response_time_p95 82 | displayName: "Response Time P95" 83 | pass: 84 | - criteria: 85 | - "<=+10%" 86 | - "<600" 87 | warning: 88 | - criteria: 89 | - "<=800" 90 | weight: 2 91 | key_sli: true 92 | ``` 93 | 94 | Further assume, that in the previous evaluation the metric response_time_p95 was 5. The upper limit for pass is 5.5 (5 + 10%). The evaluation results for all possible values would be: 95 | * pass: <= 5.5 96 | * fail: > 5.5 97 | 98 | Listed criteria are combined using a logical AND, so if we consider the pass criteria in our example both "<=+10%" and "<600" needs to be satisfied. 99 | To list multiple criteria (logical OR) it is enough to list them in different criteria element, for instance the following would enforce for response time not to be higher than 10% compared to the previous value or to be greater than 600: 100 | 101 | ```yaml 102 | objectives: 103 | - sli: response_time_p95 104 | displayName: "Response Time P95" 105 | pass: 106 | - criteria: 107 | - "<=+10%" 108 | - criteria: 109 | - "<600" 110 | weight: 2 111 | key_sli: true 112 | ``` 113 | 114 | ## Scoring 115 | 116 | * `total_score`: An evaluation for *pass* counts for one point, an evaluation for *warning* half a point, and an evaluation for *fail* zero points. The default weight of an SLI is 1 and can be overwritten. The maximum score is the sum of the weights of all SLIs. 117 | 118 | > **Note:** The actual evaluation result is divided by the maximum score and gives the `total_score` in percent. For example, the maximum score is 92 and the evaluation result is 85 - the `total_score` is 92.39% (85/92*100). 119 | 120 | > **Note:** The pass and warning criteria for the `total_score` use the logical operator ">=" by default. 121 | 122 | # Specification 123 | 124 | ```json 125 | "ServiceLevelObjectives": { 126 | "required": [ 127 | "comparison", 128 | "objectives", 129 | "spec_version", 130 | "total_score" 131 | ], 132 | "properties": { 133 | "comparison": { 134 | "$ref": "#/definitions/Comparison" 135 | }, 136 | "filter": { 137 | "patternProperties": { 138 | ".*": { 139 | "type": "string" 140 | } 141 | }, 142 | "type": "object" 143 | }, 144 | "objectives": { 145 | "items": { 146 | "$ref": "#/definitions/Objective" 147 | }, 148 | "type": "array" 149 | }, 150 | "spec_version": { 151 | "type": "string" 152 | }, 153 | "total_score": { 154 | "$ref": "#/definitions/Score" 155 | } 156 | }, 157 | "additionalProperties": false, 158 | "type": "object" 159 | }, 160 | 161 | "Comparison": { 162 | "required": [ 163 | "compare_with" 164 | ], 165 | "properties": { 166 | "aggregate_function": { 167 | "type": "string" 168 | }, 169 | "compare_with": { 170 | "type": "string" 171 | }, 172 | "include_result_with_score": { 173 | "type": "string" 174 | }, 175 | "number_of_comparison_results": { 176 | "type": "integer" 177 | } 178 | }, 179 | "additionalProperties": false, 180 | "type": "object" 181 | }, 182 | 183 | "Objective": { 184 | "required": [ 185 | "pass", 186 | "sli" 187 | ], 188 | "properties": { 189 | "key_sli": { 190 | "type": "boolean" 191 | }, 192 | "pass": { 193 | "items": { 194 | "$ref": "#/definitions/SLICriteria" 195 | }, 196 | "type": "array" 197 | }, 198 | "sli": { 199 | "type": "string" 200 | }, 201 | "displayName": { 202 | "type": "string" 203 | }, 204 | "warning": { 205 | "items": { 206 | "$ref": "#/definitions/SLICriteria" 207 | }, 208 | "type": "array" 209 | }, 210 | "weight": { 211 | "type": "integer" 212 | } 213 | }, 214 | "additionalProperties": false, 215 | "type": "object" 216 | }, 217 | 218 | "SLICriteria": { 219 | "required": [ 220 | "criteria" 221 | ], 222 | "properties": { 223 | "criteria": { 224 | "items": { 225 | "type": "string" 226 | }, 227 | "type": "array" 228 | } 229 | }, 230 | "additionalProperties": false, 231 | "type": "object" 232 | }, 233 | 234 | "Score": { 235 | "required": [ 236 | "pass", 237 | "warning" 238 | ], 239 | "properties": { 240 | "pass": { 241 | "type": "string" 242 | }, 243 | "warning": { 244 | "type": "string" 245 | } 246 | }, 247 | "additionalProperties": false, 248 | "type": "object" 249 | } 250 | ``` 251 | 252 | # Example of a Service Level Objectives (SLO) configuration (in yaml) 253 | 254 | ```yaml 255 | spec_version: '1.0' 256 | filter: 257 | mz_id: "4711" 258 | svc_id: "a14b-cd87-0d51" 259 | comparison: 260 | compare_with: "several_results" 261 | include_result_with_score: "pass" 262 | number_of_comparison_results: 3 263 | aggregate_function: avg 264 | objectives: 265 | - sli: response_time_p95 266 | displayName: "Response Time P95" 267 | pass: 268 | - criteria: 269 | - "<=+10%" 270 | - "<600" 271 | warning: 272 | - criteria: 273 | - "<=800" 274 | total_score: 275 | pass: "90%" 276 | warning: "75%" 277 | ``` 278 | -------------------------------------------------------------------------------- /shipyard.md: -------------------------------------------------------------------------------- 1 | # Shipyard 2 | 3 | * The Shipyard defines the stages an artifact has to go through. 4 | * The Shipyard defines the events that are sent out in each stage. 5 | * A Shipyard is defined at the level of a project. This means that all services in a project share the same Shipyard configuration. 6 | 7 | ## Meta-data 8 | 9 | * `apiVersion`: The version of the Shipyard specification in the format: `spec.keptn.sh/x.y.z` 10 | * `kind`: is `Shipyard` 11 | * `metadata`: Contains at least the property name, which declares a unique name for the Shipyard. 12 | * `spec`: Consists of the property stages. 13 | * `stages`: An array of stages and each stage consists of the properties name and task sequences. 14 | 15 | ## Stage 16 | 17 | A Shipyard consists of a list of stages. A stage has the properties: 18 | 19 | * `name`: A unique name of the stage. 20 | * `sequences`: An array of sequences declared by name, triggers, and tasks. 21 | 22 | ## Sequence 23 | 24 | A stage consists of a list of sequences whereby a sequence is an ordered list of tasks that are triggered sequentially. A sequence has the properties: 25 | 26 | * `name`: A unique name of the sequence 27 | * `tasks`: An array of tasks executed by the sequence in the declared order. 28 | * `triggeredOn` *(optional)*: An array of events that trigger the sequence. This property can be used to trigger a sequence once another sequence has been finished. In addition to specifying the sequence whose completion should activate the trigger, 29 | it is also possible to define a `selector` that defines whether the sequence should be triggered if the preceeding sequence has been executed successfuly, or had a `failed` or `warning` result. 30 | For example, the following sequence with the name `rollback` would only be triggered if the sequence `delivery` in production had a result of `failed`: 31 | 32 | ``` 33 | ... 34 | - name: rollback 35 | triggeredOn: 36 | - event: production.delivery.finished 37 | selector: 38 | match: 39 | result: failed 40 | ... 41 | ``` 42 | 43 | It is also possible to refer to certain tasks within the preceeding sequence. For example, by changing the `match` to `release.result: failed`, the `rollback` sequence would only be executed if the task `release` of the sequence `delivery` had a result of `failed`: 44 | 45 | ``` 46 | ... 47 | - name: rollback 48 | triggeredOn: 49 | - event: production.delivery.finished 50 | selector: 51 | match: 52 | release.result: failed 53 | ... 54 | ``` 55 | 56 | If no `selector` is specified, the sequence will only be triggered if the preceeding `delivery` sequence had a result of `pass`: 57 | ``` 58 | ... 59 | - name: rollback 60 | triggeredOn: 61 | - event: production.delivery.finished 62 | ... 63 | ``` 64 | 65 | 66 | ## Task 67 | 68 | A sequence consists of a list of tasks whereby a single task is the smallest executable unit. A task has the properties: 69 | 70 | * `name`: A unique name of the task 71 | * `triggeredAfter` *(optional)*: Wait time before task is triggered. 72 | * `properties` *(optional)*: Task properties as individual `key:value` pairs. These properties precise the task and are 73 | consumed by the unit that executes the task. 74 | 75 | # Specification 76 | 77 | ```json 78 | { 79 | "$schema": "http://json-schema.org/draft-04/schema#", 80 | "$ref": "#/definitions/Shipyard", 81 | "definitions": { 82 | "Metadata": { 83 | "required": [ 84 | "name" 85 | ], 86 | "properties": { 87 | "name": { 88 | "type": "string" 89 | } 90 | }, 91 | "additionalProperties": false, 92 | "type": "object" 93 | }, 94 | "Selector": { 95 | "required": [ 96 | "match" 97 | ], 98 | "properties": { 99 | "match": { 100 | "patternProperties": { 101 | ".*": { 102 | "type": "string" 103 | } 104 | }, 105 | "type": "object", 106 | "additionalProperties": false 107 | } 108 | }, 109 | "additionalProperties": false, 110 | "type": "object" 111 | }, 112 | "Sequence": { 113 | "required": [ 114 | "name", 115 | "tasks" 116 | ], 117 | "properties": { 118 | "name": { 119 | "type": "string" 120 | }, 121 | "triggeredOn": { 122 | "items": { 123 | "$schema": "http://json-schema.org/draft-04/schema#", 124 | "$ref": "#/definitions/Trigger" 125 | }, 126 | "type": "array" 127 | }, 128 | "tasks": { 129 | "items": { 130 | "$schema": "http://json-schema.org/draft-04/schema#", 131 | "$ref": "#/definitions/Task" 132 | }, 133 | "type": "array" 134 | } 135 | }, 136 | "additionalProperties": false, 137 | "type": "object" 138 | }, 139 | "Shipyard": { 140 | "required": [ 141 | "apiVersion", 142 | "kind", 143 | "metadata", 144 | "spec" 145 | ], 146 | "properties": { 147 | "apiVersion": { 148 | "type": "string" 149 | }, 150 | "kind": { 151 | "type": "string" 152 | }, 153 | "metadata": { 154 | "$schema": "http://json-schema.org/draft-04/schema#", 155 | "$ref": "#/definitions/Metadata" 156 | }, 157 | "spec": { 158 | "$schema": "http://json-schema.org/draft-04/schema#", 159 | "$ref": "#/definitions/ShipyardSpec" 160 | } 161 | }, 162 | "additionalProperties": false, 163 | "type": "object" 164 | }, 165 | "ShipyardSpec": { 166 | "required": [ 167 | "stages" 168 | ], 169 | "properties": { 170 | "stages": { 171 | "items": { 172 | "$schema": "http://json-schema.org/draft-04/schema#", 173 | "$ref": "#/definitions/Stage" 174 | }, 175 | "type": "array" 176 | } 177 | }, 178 | "additionalProperties": false, 179 | "type": "object" 180 | }, 181 | "Stage": { 182 | "required": [ 183 | "name", 184 | "sequences" 185 | ], 186 | "properties": { 187 | "name": { 188 | "type": "string" 189 | }, 190 | "sequences": { 191 | "items": { 192 | "$schema": "http://json-schema.org/draft-04/schema#", 193 | "$ref": "#/definitions/Sequence" 194 | }, 195 | "type": "array" 196 | } 197 | }, 198 | "additionalProperties": false, 199 | "type": "object" 200 | }, 201 | "Task": { 202 | "required": [ 203 | "name" 204 | ], 205 | "properties": { 206 | "name": { 207 | "type": "string" 208 | }, 209 | "triggeredAfter": { 210 | "type": "string" 211 | }, 212 | "properties": { 213 | "type": "object", 214 | "additionalProperties": true 215 | } 216 | }, 217 | "additionalProperties": false, 218 | "type": "object" 219 | }, 220 | "Trigger": { 221 | "required": [ 222 | "event" 223 | ], 224 | "properties": { 225 | "event": { 226 | "type": "string" 227 | }, 228 | "selector": { 229 | "$schema": "http://json-schema.org/draft-04/schema#", 230 | "$ref": "#/definitions/Selector" 231 | } 232 | }, 233 | "additionalProperties": false, 234 | "type": "object" 235 | } 236 | } 237 | } 238 | 239 | ``` 240 | 241 | # Example of a Shipyard (in yaml) 242 | 243 | ```yaml 244 | apiVersion: spec.keptn.sh/0.2.0 245 | kind: Shipyard 246 | metadata: 247 | name: shipyard-sockshop 248 | spec: 249 | stages: 250 | - name: dev 251 | sequences: 252 | - name: delivery 253 | tasks: 254 | - name: deployment 255 | properties: 256 | deploymentstrategy: direct 257 | - name: test 258 | properties: 259 | teststrategy: functional 260 | - name: evaluation 261 | - name: release 262 | 263 | - name: hardening 264 | sequences: 265 | - name: delivery 266 | triggeredOn: 267 | - event: dev.delivery.finished 268 | tasks: 269 | - name: deployment 270 | properties: 271 | deploymentstrategy: blue_green_service 272 | - name: test 273 | properties: 274 | teststrategy: performance 275 | - name: evaluation 276 | - name: release 277 | 278 | - name: production 279 | sequences: 280 | - name: delivery 281 | triggeredOn: 282 | - event: hardening.delivery.finished 283 | tasks: 284 | - name: deployment 285 | properties: 286 | deploymentstrategy: blue_green 287 | - name: release 288 | - name: rollback 289 | triggeredOn: 290 | - event: production.delivery.finished 291 | selector: 292 | match: 293 | result: failed 294 | tasks: 295 | - name: rollback 296 | - name: remediation 297 | tasks: 298 | - name: remediation 299 | - name: evaluation 300 | triggeredAfter: "10m" 301 | ``` 302 | 303 | # Reserved Keptn Tasks 304 | 305 | Reserved Keptn tasks are explained below: 306 | * [**approval**](#approval) 307 | * [**deployment**](#deployment) 308 | * [**evaluation**](#evaluation) 309 | * [**release**](#release) 310 | * [**rollback**](#rollback) 311 | * [**remediation**](#remediation) 312 | * [**test**](#test) 313 | 314 | ## approval 315 | 316 | Defines the kind of approval, which is required before deploying an artifact in a stage. The approval strategy can be defined based on the evaluation result `pass` and `warning`. Keptn supports the approval strategies for the evaluation results `pass` and `warning` set to: 317 | * `automatic`: Task sequence continues without requesting approval. 318 | * `manual`: Task sequence requests for approval before continuing. 319 | 320 | *Usage:* 321 | ```yaml 322 | - name: approval 323 | properties: 324 | pass: automatic 325 | warning: manual 326 | ``` 327 | 328 | > **Note:** Per default, an `automatic` approval strategy is used for evaluation result `pass` and `warning`. 329 | 330 | ## deployment 331 | 332 | Defines the deployment strategy used to deploy a new version of a service. For example, the *helm-service* supports the deployment `strategy` set to: 333 | 334 | * `direct`: Deploys a new version of a service by replacing the old version of the service. 335 | * `blue_green_service`: Deploys a new version of a service next to the old one. After a successful validation of this new version, it replaces the old one and is marked as stable. 336 | 337 | *Usage:* 338 | ```yaml 339 | - name: deployment 340 | properties: 341 | deploymentstrategy: blue_green_service 342 | ``` 343 | 344 | ## evaluation 345 | 346 | Defines the quality evaluation that is executed to verify the quality of a deplyoment based on its SLOs/SLIs. 347 | 348 | *Usage:* 349 | ```yaml 350 | - name: evaluation 351 | ``` 352 | 353 | ## release 354 | 355 | Defines the releasing task that is executed after a successful deployment happened. 356 | 357 | *Usage:* 358 | ```yaml 359 | - name: release 360 | ``` 361 | 362 | ## rollback 363 | 364 | Defines the rollback task that is executed when a rollback shall be triggered. 365 | 366 | *Usage:* 367 | 368 | ```yaml 369 | - name: rollback 370 | ``` 371 | 372 | ## remediation 373 | 374 | Defines whether remediation actions are enabled or not. 375 | 376 | *Usage:* 377 | ```yaml 378 | - name: remediation 379 | ``` 380 | 381 | ## test 382 | 383 | Defines the test strategy used to validate a deployment. Failed tests result in an automatic roll-back of the latest deployment in case of a blue/green deployment strategy. For example, the *jmeter-service* supports the `teststrategy` set to: 384 | * `functional`: Test a deployment based on functional tests. 385 | * `performance`: Test a deployment based on performance/load tests. 386 | 387 | *Usage:* 388 | ```yaml 389 | - name: test 390 | properties: 391 | teststrategy: functional 392 | ``` 393 | 394 | -------------------------------------------------------------------------------- /webhook.md: -------------------------------------------------------------------------------- 1 | # Webhooks 2 | 3 | * A *Webhook* specifies a request that should be performed by Keptn's webhook service when a certain event occurs during a task sequence execution. 4 | * Webhooks need to be linked to a specific subscription of the Keptn Uniform to be executed. 5 | * Webhooks are defined in a file called `webhook.yaml`, which can be stored in either the *project*, *stage* or *service* directory of a project's upstream repository. 6 | 7 | ### Metadata 8 | 9 | * `apiVersion` is set to `webhookconfig.keptn.sh/v1beta1` 10 | * `Kind` is set to `Webhook` 11 | 12 | ### Webhooks 13 | 14 | * `webhooks`: Defines a list of webhooks which can be executed by the webhook-service 15 | * `type`: The event type that should trigger the webhook 16 | * `subscriptionID`: The ID of the subscription for which the webhook should be executed 17 | * `sendStarted`: Indicates whether the webhook-service should send a `sh.keptn.event..started` event before executing the requests. Only applicable for webhooks that are triggered by `sh.keptn.event..triggered` events. 18 | * `sendFinished`: Indicates whether the webhook-service should send a `sh.keptn.event..finished` event after executing the requests. Only applicable for webhooks that are triggered by `sh.keptn.event..triggered` events. 19 | * `envFrom`: Allows including sensitive data (e.g. API Tokens) in the executed request by referring to a value stored as a Kubernetes secret 20 | * `requests`: List of requests that should be executed for the webhook 21 | 22 | ### EnvFrom 23 | 24 | * `envFrom` defines a list of references to Kubernetes secrets to include sensitive data in a webhook request. 25 | * `name`: Name of variable by which it's value can be addressed in the request 26 | * `secretRef`: Specifies the reference to the Kubernetes secret 27 | * `name`: Name of the secret 28 | * `key`: Key within the secret. The value of that key will be bound to `envFrom.name` 29 | 30 | ### Requests 31 | 32 | * `requests`: Defines a list of requests that should be executed for a webhook 33 | * `url`: Defines the URL that should be called 34 | * `method`: Defines the HTTP method for the request (`GET`, `POST`, `PUT`, `PATCH`, `DELETE`) 35 | * `headers`: Defines a list of HTTP headers that should be used for the request. 36 | * `payload`: The payload that should be used for the request 37 | 38 | ## Specification 39 | 40 | ```json 41 | { 42 | "Webhook": { 43 | "type": "object", 44 | "additionalProperties": false, 45 | "properties": { 46 | "apiVersion": { 47 | "type": "string" 48 | }, 49 | "kind": { 50 | "type": "string" 51 | }, 52 | "metadata": { 53 | "$ref": "#/definitions/Metadata" 54 | }, 55 | "spec": { 56 | "$ref": "#/definitions/Spec" 57 | } 58 | }, 59 | "required": [ 60 | "apiVersion", 61 | "kind", 62 | "spec" 63 | ], 64 | "title": "Webhook" 65 | }, 66 | "Metadata": { 67 | "type": "object", 68 | "additionalProperties": false, 69 | "properties": { 70 | "name": { 71 | "type": "string" 72 | } 73 | }, 74 | "required": [ 75 | "name" 76 | ], 77 | "title": "Metadata" 78 | }, 79 | "Spec": { 80 | "type": "object", 81 | "additionalProperties": false, 82 | "properties": { 83 | "webhooks": { 84 | "type": "array", 85 | "items": { 86 | "$ref": "#/definitions/Webhook" 87 | } 88 | } 89 | }, 90 | "required": [ 91 | "webhooks" 92 | ], 93 | "title": "Spec" 94 | }, 95 | "Webhook": { 96 | "type": "object", 97 | "additionalProperties": false, 98 | "properties": { 99 | "type": { 100 | "type": "string" 101 | }, 102 | "subscriptionID": { 103 | "type": "string" 104 | }, 105 | "sendStarted": { 106 | "type": "boolean" 107 | }, 108 | "sendFinished": { 109 | "type": "boolean" 110 | }, 111 | "envFrom": { 112 | "type": "array", 113 | "items": { 114 | "$ref": "#/definitions/EnvFrom" 115 | } 116 | }, 117 | "requests": { 118 | "type": "array", 119 | "items": { 120 | "$ref": "#/definitions/Request" 121 | } 122 | } 123 | }, 124 | "required": [ 125 | "requests", 126 | "subscriptionID", 127 | "type" 128 | ], 129 | "title": "Webhook" 130 | }, 131 | "EnvFrom": { 132 | "type": "object", 133 | "additionalProperties": false, 134 | "properties": { 135 | "name": { 136 | "type": "string" 137 | }, 138 | "secretRef": { 139 | "$ref": "#/definitions/SecretRef" 140 | } 141 | }, 142 | "required": [ 143 | "name", 144 | "secretRef" 145 | ], 146 | "title": "EnvFrom" 147 | }, 148 | "SecretRef": { 149 | "type": "object", 150 | "additionalProperties": false, 151 | "properties": { 152 | "name": { 153 | "type": "string" 154 | }, 155 | "key": { 156 | "type": "string" 157 | } 158 | }, 159 | "required": [ 160 | "key", 161 | "name" 162 | ], 163 | "title": "SecretRef" 164 | }, 165 | "Request": { 166 | "type": "object", 167 | "additionalProperties": false, 168 | "properties": { 169 | "url": { 170 | "type": "string" 171 | }, 172 | "method": { 173 | "type": "string" 174 | }, 175 | "headers": { 176 | "type": "array", 177 | "items": { 178 | "$ref": "#/definitions/Header" 179 | } 180 | }, 181 | "payload": { 182 | "type": "string" 183 | } 184 | }, 185 | "required": [ 186 | "method", 187 | "url" 188 | ], 189 | "title": "Request" 190 | }, 191 | "Header": { 192 | "type": "object", 193 | "additionalProperties": false, 194 | "properties": { 195 | "key": { 196 | "type": "string" 197 | }, 198 | "value": { 199 | "type": "string" 200 | } 201 | }, 202 | "required": [ 203 | "key", 204 | "value" 205 | ], 206 | "title": "Header" 207 | } 208 | } 209 | ``` 210 | 211 | ## Example of a Webhook configuration (in yaml) 212 | 213 | ```yaml 214 | apiVersion: webhookconfig.keptn.sh/v1beta1 215 | kind: WebhookConfig 216 | metadata: 217 | name: webhook-configuration 218 | spec: 219 | webhooks: 220 | - type: sh.keptn.event.evaluation.finished 221 | subscriptionID: "0123456987" 222 | sendStarted: true 223 | sendFinished: true 224 | envFrom: 225 | - name: "secretKey" 226 | secretRef: 227 | name: "my-webhook-secret" 228 | key: "my-key" 229 | requests: 230 | - url: https://hooks.slack.com/services/{{.env.secretKey}} 231 | method: POST 232 | headers: 233 | - key: Content-type 234 | value: application/json 235 | payload: >- 236 | {"text": "Evaluation {{.data.evaluation.result}} with a score of {{.data.evaluation.score}} "} 237 | ``` --------------------------------------------------------------------------------