get.porter.sh/porter@v1.3.0/pkg/schema/manifest.v1.1.0.schema.json (about) 1 { 2 "$schema": "http://json-schema.org/draft-07/schema#", 3 "$id": "https://porter.sh/schema/v1/manifest.schema.json", 4 "title": "Porter manifest json schema", 5 "description": "Describes the format of the Porter manifest, porter.yaml. This does not include the schema of the mixins, use the porter schema command to generate a schema document that includes all installed mixins.", 6 "type": "object", 7 "definitions": { 8 "applyTo": { 9 "description": "An optional exhaustive list of actions that apply to this item. When none are specified, all actions apply.", 10 "type": "array", 11 "items": { 12 "type": "string" 13 } 14 }, 15 "credential": { 16 "description": "Credential defines a particular credential, and where it should be placed in the bundle image", 17 "properties": { 18 "applyTo": { 19 "$ref": "#/definitions/applyTo" 20 }, 21 "description": { 22 "description": "A user-friendly description of this credential", 23 "type": "string" 24 }, 25 "env": { 26 "description": "The environment variable name, such as MY_VALUE, into which the credential value is stored", 27 "type": "string" 28 }, 29 "name": { 30 "description": "The name of this credential", 31 "type": "string" 32 }, 33 "path": { 34 "description": "The path inside of the bundle image where credentials will be mounted", 35 "type": "string" 36 }, 37 "required": { 38 "description": "Indicates whether this credential must be supplied. By default, credentials are optional.", 39 "type": "boolean" 40 } 41 }, 42 "required": [ 43 "name" 44 ], 45 "type": "object" 46 }, 47 "output": { 48 "description": "A value that is produced by running an bundle image", 49 "allOf": [ 50 { 51 "$ref": "https://porter.sh/schema/json-schema.json" 52 }, 53 { 54 "properties": { 55 "applyTo": { 56 "$ref": "#/definitions/applyTo" 57 }, 58 "description": { 59 "description": "A user-friendly description of this output", 60 "type": "string" 61 }, 62 "name": { 63 "description": "The name of this output", 64 "type": "string" 65 }, 66 "sensitive": { 67 "description": "Indicates whether this output's value is sensitive and should not be logged.", 68 "type": "boolean" 69 }, 70 "path": { 71 "description": "The path to the location of the output", 72 "type": "string" 73 } 74 }, 75 "required": [ 76 "name" 77 ], 78 "type": "object" 79 } 80 ] 81 }, 82 "parameter": { 83 "description": "A parameter that can be passed into the bundle image", 84 "allOf": [ 85 { 86 "$ref": "https://porter.sh/schema/json-schema.json" 87 }, 88 { 89 "properties": { 90 "applyTo": { 91 "$ref": "#/definitions/applyTo" 92 }, 93 "description": { 94 "description": "A user-friendly description of this parameter", 95 "type": "string" 96 }, 97 "env": { 98 "description": "The environment variable name, such as MY_VALUE, in which the parameter value is stored", 99 "type": "string" 100 }, 101 "path": { 102 "description": "The path inside of the bundle image where parameter data is mounted", 103 "type": "string" 104 }, 105 "name": { 106 "description": "The name of this parameter", 107 "type": "string" 108 }, 109 "sensitive": { 110 "description": "Indicates whether this parameter's value is sensitive and should not be logged.", 111 "type": "boolean" 112 }, 113 "source": { 114 "description": "Indicates that the parameter should get its value from an external source.", 115 "type": "object", 116 "properties": { 117 "dependency": { 118 "description": "The name of the dependency that generated the output. If not set, the output must be generated by the current bundle.", 119 "type": "string", 120 "minLength": 1 121 }, 122 "output": { 123 "description": "An output name. The parameter's value is set to output's last value.", 124 "type": "string", 125 "minLength": 1 126 } 127 }, 128 "required": [ 129 "output" 130 ], 131 "additionalProperties": false 132 } 133 }, 134 "required": [ 135 "name" 136 ], 137 "type": "object" 138 } 139 ] 140 }, 141 "stateVar": { 142 "description": "A state variable that is generated by the bundle and injected on subsequent runs.", 143 "properties": { 144 "description": { 145 "description": "Description of how the variable is used by the bundle.", 146 "type": "string" 147 }, 148 "path": { 149 "description": "The path inside of the bundle image where the state variable data is mounted", 150 "type": "string" 151 }, 152 "name": { 153 "description": "The name of this state variable", 154 "type": "string" 155 }, 156 "mixin": { 157 "description": "The name of the mixin that generates and manages this state variable", 158 "type": "string" 159 } 160 }, 161 "required": [ 162 "name", 163 "path" 164 ], 165 "type": "object" 166 }, 167 "dependency": { 168 "additionalProperties": false, 169 "properties": { 170 "name": { 171 "type": "string" 172 }, 173 "bundle": { 174 "$ref": "#/definitions/bundle" 175 }, 176 "sharing": { 177 "$ref": "#/definitions/sharingCriteria" 178 }, 179 "parameters": { 180 "description": "Map of parameter names to a parameter source, such as bundle.parameters.PARAM, bundle.dependencies.DEP.outputs.OUTPUT, or bundle.credentials.CRED", 181 "type": "object", 182 "additionalProperties": { 183 "type": "string" 184 } 185 }, 186 "credentials": { 187 "description": "Map of credential names to a source, such as bundle.credentials.NAME or bundle.dependencies.DEP.outputs.OUTPUT", 188 "type": "object", 189 "additionalProperties": { 190 "type": "string" 191 } 192 }, 193 "outputs": { 194 "description": "Map of output names to a source, such as bundle.dependencies.DEP.outputs.OUTPUT", 195 "type": "object", 196 "additionalProperties": { 197 "type": "string" 198 } 199 } 200 }, 201 "required": [ 202 "name", 203 "bundle" 204 ], 205 "type": "object" 206 }, 207 "dependencyProvider": { 208 "description": "Specifies how the bundle can satisfy a dependency, by declaring supported interfaces.", 209 "type": "object", 210 "properties": { 211 "interface": { 212 "description": "Declares the bundle interface that the current bundle provides.", 213 "properties": { 214 "id": { 215 "description": "The URI of the interface, commonly known as the interface name. Usually a well-known interface defined by Porter or CNAB.", 216 "type": "string", 217 "minLength": 1 218 } 219 }, 220 "additionalProperties": false 221 } 222 }, 223 "additionalProperties": false 224 }, 225 "bundle": { 226 "description": "The definition of a bundle reference", 227 "properties": { 228 "reference": { 229 "description": "The full bundle reference for the dependency in the format REGISTRY/NAME:TAG", 230 "type": "string" 231 }, 232 "version": { 233 "description": "Bundle version constraint for version matching, see https://github.com/Masterminds/semver/blob/master/README.md#checking-version-constraints", 234 "type": "string" 235 }, 236 "interface": { 237 "description": "Criteria for allowing a bundle to satisfy a dependency.", 238 "type": "object", 239 "properties": { 240 "id": { 241 "description": "The URI of the bundle interface.", 242 "type": "string", 243 "minLength": 1 244 }, 245 "reference": { 246 "description": "An OCI reference to a bundle that should be used as the interface definition.", 247 "type": "string", 248 "minLength": 1 249 }, 250 "document": { 251 "description": "An embedded document that describes the bundle interface", 252 "type": "object", 253 "properties": { 254 "credentials": { 255 "$ref": "#/definitions/credential" 256 }, 257 "parameters": { 258 "$ref": "#/definitions/parameter" 259 }, 260 "outputs": { 261 "$ref": "#/definitions/output" 262 } 263 }, 264 "additionalProperties": false 265 } 266 }, 267 "additionalProperties": false 268 } 269 }, 270 "required": [ 271 "reference" 272 ], 273 "type": "object" 274 }, 275 "customAction": { 276 "type": "object", 277 "properties": { 278 "description": { 279 "type": "string", 280 "description": "A description of the custom action" 281 }, 282 "modifies": { 283 "type": "boolean", 284 "description": "Specifies that the action will modify resources in any way." 285 }, 286 "stateless": { 287 "type": "boolean", 288 "description": "Specifies that the action does not act on a claim, and does not require credentials." 289 } 290 }, 291 "additionalProperties": false 292 }, 293 "image": { 294 "description": "An image represents an application image used in a bundle", 295 "type": "object", 296 "properties": { 297 "description": { 298 "description": "A user-friendly description of this image", 299 "type": "string" 300 }, 301 "imageType": { 302 "description": "The type of this image, i.e. docker", 303 "type": "string" 304 }, 305 "repository": { 306 "description": "The repository portion of the image reference, i.e. deislabs/coolapp", 307 "type": "string" 308 }, 309 "digest": { 310 "description": "The content digest of the image, i.e. sha256:cafebabe...", 311 "type": "string" 312 }, 313 "size": { 314 "description": "The size of the image", 315 "type": "integer" 316 }, 317 "mediaType": { 318 "description": "The media type of the image", 319 "type": "string" 320 }, 321 "tag": { 322 "description": "The tag the image", 323 "type": "string" 324 }, 325 "labels": { 326 "description": "Key/value pairs that used to specify identifying attributes of images", 327 "type": "object", 328 "additionalProperties": { 329 "type": "string" 330 } 331 } 332 }, 333 "required": [ 334 "repository" 335 ], 336 "additionalProperties": false 337 }, 338 "maintainer": { 339 "additionalProperties": false, 340 "description": "Bundle Maintainer", 341 "properties": { 342 "email": { 343 "description": "Email of the maintainer", 344 "type": "string" 345 }, 346 "name": { 347 "description": "Name of the maintainer", 348 "type": "string" 349 }, 350 "url": { 351 "description": "Url of the maintainer", 352 "type": "string" 353 } 354 }, 355 "type": "object" 356 }, 357 "sharingCriteria": { 358 "description": "The set of rules for sharing a dependency with other bundles.", 359 "required": ["mode"], 360 "properties": { 361 "mode": { 362 "description": "Mode defines how a dependency can be shared.\n - none: The dependency cannot be shared, even within the same dependency graph.\n - group: The dependency is shared with other bundles who defined the dependency with the same sharing group. This is the default mode.", 363 "type": "string", 364 "enum": ["none", "group"], 365 "default": "group" 366 }, 367 "group": { 368 "description": "Defines matching criteria for determining if two dependencies are in the same sharing group.", 369 "type": "object", 370 "required": ["name"], 371 "properties": { 372 "name": { 373 "description": "Name of the sharing group. The name of the group must match for two bundles to share the same dependency.", 374 "type": "string" 375 } 376 }, 377 "additionalProperties": false 378 } 379 }, 380 "additionalProperties": false 381 } 382 }, 383 "properties": { 384 "schemaType": { 385 "description": "The resource type of the current document.", 386 "type": "string", 387 "default": "Bundle" 388 }, 389 "schemaVersion": { 390 "description": "The version of the schema used in this file", 391 "type": "string", 392 "default": "1.1.0" 393 }, 394 "credentials": { 395 "type": "array", 396 "items": { 397 "$ref": "#/definitions/credential" 398 }, 399 "description": "Credentials to be injected into the bundle image" 400 }, 401 "description": { 402 "type": "string", 403 "description": "A description of the bundle" 404 }, 405 "install": { 406 "type": "array", 407 "items": { 408 "anyOf": [] 409 } 410 }, 411 "reference": { 412 "description": "The full reference to use when the bundle is published to an OCI registry", 413 "type": "string" 414 }, 415 "registry": { 416 "description": "The OCI registry to use when the bundle is published", 417 "type": "string" 418 }, 419 "mixins": { 420 "type": "array", 421 "items": { 422 "oneOf": [ 423 { 424 "description": "Declare a mixin without configuration", 425 "type": "string", 426 "enum": [] 427 } 428 ] 429 } 430 }, 431 "name": { 432 "type": "string", 433 "description": "The name of the bundle" 434 }, 435 "outputs": { 436 "type": "array", 437 "items": { 438 "$ref": "#/definitions/output" 439 }, 440 "description": "Values that are produced by executing the bundle image" 441 }, 442 "parameters": { 443 "type": "array", 444 "items": { 445 "$ref": "#/definitions/parameter" 446 }, 447 "description": "Parameters that can be injected into the bundle image" 448 }, 449 "state": { 450 "description": "State variables that are generated by the bundle and injected on subsequent runs.", 451 "type": "array", 452 "items": { 453 "$ref": "#/definitions/stateVar" 454 } 455 }, 456 "dependencies": { 457 "additionalProperties": false, 458 "description": "Dependent bundles that must be executed with the bundle", 459 "properties": { 460 "provides": { 461 "$ref": "#/definitions/dependencyProvider" 462 }, 463 "requires": { 464 "description": "Required dependent bundles", 465 "items": { 466 "$ref": "#/definitions/dependency" 467 }, 468 "type": "array" 469 } 470 }, 471 "required": [ 472 "requires" 473 ], 474 "type": "object" 475 }, 476 "required": { 477 "description": "Required extensions for this bundle", 478 "type": "array", 479 "items": [ 480 { 481 "type": [ 482 "string", 483 "object" 484 ], 485 "properties": { 486 "docker": { 487 "$schema": "http://json-schema.org/draft-07/schema#", 488 "type": "object", 489 "properties": { 490 "privileged": { 491 "description": "Option to set the --privileged flag when running the Docker container", 492 "type": "boolean" 493 } 494 }, 495 "additionalProperties": false 496 } 497 } 498 } 499 ], 500 "uniqueItems": true, 501 "additionalItems": true 502 }, 503 "uninstall": { 504 "type": "array", 505 "items": { 506 "anyOf": [] 507 } 508 }, 509 "upgrade": { 510 "type": "array", 511 "items": { 512 "anyOf": [] 513 } 514 }, 515 "version": { 516 "type": "string", 517 "description": "The version of the bundle, uses semver" 518 }, 519 "dockerfile": { 520 "type": "string", 521 "description": "The relative path to a Dockerfile to use as a template during porter build" 522 }, 523 "customActions": { 524 "type": "object", 525 "additionalProperties": { 526 "$ref": "#/definitions/customAction" 527 } 528 }, 529 "images": { 530 "type": "object", 531 "additionalProperties": { 532 "$ref": "#/definitions/image" 533 } 534 }, 535 "custom": { 536 "description": "Custom bundle metadata", 537 "type": "object", 538 "additionalProperties": true 539 }, 540 "maintainers": { 541 "description": "Bundle maintainers", 542 "items": { 543 "$ref": "#/definitions/maintainer" 544 }, 545 "type": "array" 546 } 547 }, 548 "additionalProperties": { 549 "type": "array", 550 "items": { 551 "anyOf": [] 552 } 553 }, 554 "required": [ 555 "schemaVersion", 556 "name", 557 "mixins", 558 "install", 559 "upgrade", 560 "uninstall" 561 ] 562 }