get.porter.sh/porter@v1.3.0/pkg/porter/testdata/schema.json (about) 1 { 2 "$id": "https://porter.sh/schema/v1/manifest.schema.json", 3 "$schema": "http://json-schema.org/draft-07/schema#", 4 "additionalProperties": { 5 "items": { 6 "anyOf": [ 7 { 8 "$ref": "#/mixin.exec/definitions/invokeStep" 9 }, 10 { 11 "$ref": "#/mixin.testmixin/definitions/invokeStep" 12 } 13 ] 14 }, 15 "type": "array" 16 }, 17 "definitions": { 18 "applyTo": { 19 "description": "An optional exhaustive list of actions that apply to this item. When none are specified, all actions apply.", 20 "items": { 21 "type": "string" 22 }, 23 "type": "array" 24 }, 25 "bundle": { 26 "description": "The definition of a bundle reference", 27 "properties": { 28 "reference": { 29 "description": "The full bundle reference for the dependency in the format REGISTRY/NAME:TAG", 30 "type": "string" 31 }, 32 "version": { 33 "description": "Bundle version constraint for version matching, see https://github.com/Masterminds/semver/blob/master/README.md#checking-version-constraints", 34 "type": "string" 35 } 36 }, 37 "required": [ 38 "reference" 39 ], 40 "type": "object" 41 }, 42 "credential": { 43 "description": "Credential defines a particular credential, and where it should be placed in the bundle image", 44 "properties": { 45 "applyTo": { 46 "$ref": "#/definitions/applyTo" 47 }, 48 "description": { 49 "description": "A user-friendly description of this credential", 50 "type": "string" 51 }, 52 "env": { 53 "description": "The environment variable name, such as MY_VALUE, into which the credential value is stored", 54 "type": "string" 55 }, 56 "name": { 57 "description": "The name of this credential", 58 "type": "string" 59 }, 60 "path": { 61 "description": "The path inside of the bundle image where credentials will be mounted", 62 "type": "string" 63 }, 64 "required": { 65 "description": "Indicates whether this credential must be supplied. By default, credentials are optional.", 66 "type": "boolean" 67 } 68 }, 69 "required": [ 70 "name" 71 ], 72 "type": "object" 73 }, 74 "customAction": { 75 "additionalProperties": false, 76 "properties": { 77 "description": { 78 "description": "A description of the custom action", 79 "type": "string" 80 }, 81 "modifies": { 82 "description": "Specifies that the action will modify resources in any way.", 83 "type": "boolean" 84 }, 85 "stateless": { 86 "description": "Specifies that the action does not act on a claim, and does not require credentials.", 87 "type": "boolean" 88 } 89 }, 90 "type": "object" 91 }, 92 "dependency": { 93 "additionalProperties": false, 94 "properties": { 95 "bundle": { 96 "$ref": "#/definitions/bundle" 97 }, 98 "name": { 99 "type": "string" 100 }, 101 "parameters": { 102 "additionalProperties": { 103 "type": "string" 104 }, 105 "description": "Map of parameter names to a parameter source, such as bundle.parameters.PARAM, bundle.dependencies.DEP.outputs.OUTPUT, or bundle.credentials.CRED", 106 "type": "object" 107 } 108 }, 109 "required": [ 110 "name", 111 "bundle" 112 ], 113 "type": "object" 114 }, 115 "image": { 116 "additionalProperties": false, 117 "description": "An image represents an application image used in a bundle", 118 "properties": { 119 "description": { 120 "description": "A user-friendly description of this image", 121 "type": "string" 122 }, 123 "digest": { 124 "description": "The content digest of the image, i.e. sha256:cafebabe...", 125 "type": "string" 126 }, 127 "imageType": { 128 "description": "The type of this image, i.e. docker", 129 "type": "string" 130 }, 131 "labels": { 132 "additionalProperties": { 133 "type": "string" 134 }, 135 "description": "Key/value pairs that used to specify identifying attributes of images", 136 "type": "object" 137 }, 138 "mediaType": { 139 "description": "The media type of the image", 140 "type": "string" 141 }, 142 "repository": { 143 "description": "The repository portion of the image reference, i.e. deislabs/coolapp", 144 "type": "string" 145 }, 146 "size": { 147 "description": "The size of the image", 148 "type": "integer" 149 }, 150 "tag": { 151 "description": "The tag the image", 152 "type": "string" 153 } 154 }, 155 "required": [ 156 "repository" 157 ], 158 "type": "object" 159 }, 160 "maintainer": { 161 "additionalProperties": false, 162 "description": "Bundle Maintainer", 163 "properties": { 164 "email": { 165 "description": "Email of the maintainer", 166 "type": "string" 167 }, 168 "name": { 169 "description": "Name of the maintainer", 170 "type": "string" 171 }, 172 "url": { 173 "description": "Url of the maintainer", 174 "type": "string" 175 } 176 }, 177 "type": "object" 178 }, 179 "output": { 180 "allOf": [ 181 { 182 "$ref": "https://porter.sh/schema/json-schema.json" 183 }, 184 { 185 "properties": { 186 "applyTo": { 187 "$ref": "#/definitions/applyTo" 188 }, 189 "description": { 190 "description": "A user-friendly description of this output", 191 "type": "string" 192 }, 193 "name": { 194 "description": "The name of this output", 195 "type": "string" 196 }, 197 "path": { 198 "description": "The path to the location of the output", 199 "type": "string" 200 }, 201 "sensitive": { 202 "description": "Indicates whether this output's value is sensitive and should not be logged.", 203 "type": "boolean" 204 } 205 }, 206 "required": [ 207 "name" 208 ], 209 "type": "object" 210 } 211 ], 212 "description": "A value that is produced by running an bundle image" 213 }, 214 "parameter": { 215 "allOf": [ 216 { 217 "$ref": "https://porter.sh/schema/json-schema.json" 218 }, 219 { 220 "properties": { 221 "applyTo": { 222 "$ref": "#/definitions/applyTo" 223 }, 224 "description": { 225 "description": "A user-friendly description of this parameter", 226 "type": "string" 227 }, 228 "env": { 229 "description": "The environment variable name, such as MY_VALUE, in which the parameter value is stored", 230 "type": "string" 231 }, 232 "name": { 233 "description": "The name of this parameter", 234 "type": "string" 235 }, 236 "path": { 237 "description": "The path inside of the bundle image where parameter data is mounted", 238 "type": "string" 239 }, 240 "sensitive": { 241 "description": "Indicates whether this parameter's value is sensitive and should not be logged.", 242 "type": "boolean" 243 }, 244 "source": { 245 "additionalProperties": false, 246 "description": "Indicates that the parameter should get its value from an external source.", 247 "properties": { 248 "dependency": { 249 "description": "The name of the dependency that generated the output. If not set, the output must be generated by the current bundle.", 250 "minLength": 1, 251 "type": "string" 252 }, 253 "output": { 254 "description": "An output name. The parameter's value is set to output's last value.", 255 "minLength": 1, 256 "type": "string" 257 } 258 }, 259 "required": [ 260 "output" 261 ], 262 "type": "object" 263 } 264 }, 265 "required": [ 266 "name" 267 ], 268 "type": "object" 269 } 270 ], 271 "description": "A parameter that can be passed into the bundle image" 272 }, 273 "stateVar": { 274 "description": "A state variable that is generated by the bundle and injected on subsequent runs.", 275 "properties": { 276 "description": { 277 "description": "Description of how the variable is used by the bundle.", 278 "type": "string" 279 }, 280 "mixin": { 281 "description": "The name of the mixin that generates and manages this state variable", 282 "type": "string" 283 }, 284 "name": { 285 "description": "The name of this state variable", 286 "type": "string" 287 }, 288 "path": { 289 "description": "The path inside of the bundle image where the state variable data is mounted", 290 "type": "string" 291 } 292 }, 293 "required": [ 294 "name", 295 "path" 296 ], 297 "type": "object" 298 } 299 }, 300 "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.", 301 "mixin.exec": { 302 "$schema": "http://json-schema.org/draft-07/schema#", 303 "additionalProperties": { 304 "items": { 305 "$ref": "#/mixin.exec/definitions/invokeStep" 306 }, 307 "type": "array" 308 }, 309 "definitions": { 310 "exec": { 311 "additionalProperties": false, 312 "description": "A step that is executed by the exec mixin", 313 "properties": { 314 "arguments": { 315 "description": "Positional arguments to pass to the command before any flags", 316 "items": { 317 "minItems": 1, 318 "type": "string" 319 }, 320 "type": "array" 321 }, 322 "command": { 323 "description": "The name of the command to run", 324 "type": "string" 325 }, 326 "description": { 327 "description": "A description of the mixin step", 328 "type": "string" 329 }, 330 "dir": { 331 "description": "The directory in which to execute the command", 332 "type": "string" 333 }, 334 "envs": { 335 "additionalProperties": { 336 "type": "string" 337 }, 338 "description": "Environment variables to add to the env of the command", 339 "type": "object" 340 }, 341 "flags": { 342 "additionalProperties": { 343 "type": "string" 344 }, 345 "description": "Flags to pass to the command", 346 "type": "object" 347 }, 348 "ignoreError": { 349 "additionalProperties": false, 350 "description": "Ignore the command's errors under certain conditions", 351 "properties": { 352 "all": { 353 "description": "Ignore all errors", 354 "type": "boolean" 355 }, 356 "exitCodes": { 357 "description": "Ignore errors when one of the following exit codes are returned", 358 "items": { 359 "type": "integer" 360 }, 361 "type": "array" 362 }, 363 "output": { 364 "additionalProperties": false, 365 "description": "Ignore errors when the command's stderr meets certain conditions", 366 "properties": { 367 "contains": { 368 "description": "Ignore errors when stderr contains any of the following strings", 369 "items": { 370 "type": "string" 371 }, 372 "type": "array" 373 }, 374 "regex": { 375 "description": "Ignore errors when stderr matches any of the following regular expressions", 376 "items": { 377 "type": "string" 378 }, 379 "type": "array" 380 } 381 }, 382 "type": "object" 383 } 384 }, 385 "type": "object" 386 }, 387 "outputs": { 388 "description": "List of outputs to capture from the command output", 389 "items": { 390 "additionalProperties": false, 391 "oneOf": [ 392 { 393 "required": [ 394 "jsonPath" 395 ] 396 }, 397 { 398 "required": [ 399 "regex" 400 ] 401 }, 402 { 403 "required": [ 404 "path" 405 ] 406 } 407 ], 408 "properties": { 409 "jsonPath": { 410 "description": "A json path expression that should be executed against the command's stdout to use as the output value", 411 "type": "string" 412 }, 413 "name": { 414 "description": "The output name", 415 "type": "string" 416 }, 417 "path": { 418 "description": "A path to a file that was generated by the command to use as the output value", 419 "type": "string" 420 }, 421 "regex": { 422 "description": "A regular expression that should be executed against the command's stdout to use as the output value", 423 "type": "string" 424 } 425 }, 426 "required": [ 427 "name" 428 ], 429 "type": "object" 430 }, 431 "type": "array" 432 }, 433 "suffix-arguments": { 434 "description": "Positional arguments to pass to the command after any flags", 435 "items": { 436 "minItems": 1, 437 "type": "string" 438 }, 439 "type": "array" 440 }, 441 "suppress-output": { 442 "description": "Do not print output from the command", 443 "type": "boolean" 444 } 445 }, 446 "required": [ 447 "command" 448 ], 449 "type": "object" 450 }, 451 "installStep": { 452 "additionalProperties": false, 453 "properties": { 454 "exec": { 455 "$ref": "#/mixin.exec/definitions/exec" 456 } 457 }, 458 "required": [ 459 "exec" 460 ], 461 "type": "object" 462 }, 463 "invokeStep": { 464 "additionalProperties": false, 465 "properties": { 466 "exec": { 467 "$ref": "#/mixin.exec/definitions/exec" 468 } 469 }, 470 "required": [ 471 "exec" 472 ], 473 "type": "object" 474 }, 475 "uninstallStep": { 476 "additionalProperties": false, 477 "properties": { 478 "exec": { 479 "$ref": "#/mixin.exec/definitions/exec" 480 } 481 }, 482 "required": [ 483 "exec" 484 ], 485 "type": "object" 486 }, 487 "upgradeStep": { 488 "additionalProperties": false, 489 "properties": { 490 "exec": { 491 "$ref": "#/mixin.exec/definitions/exec" 492 } 493 }, 494 "required": [ 495 "exec" 496 ], 497 "type": "object" 498 } 499 }, 500 "properties": { 501 "install": { 502 "items": { 503 "$ref": "#/mixin.exec/definitions/installStep" 504 }, 505 "type": "array" 506 }, 507 "uninstall": { 508 "items": { 509 "$ref": "#/mixin.exec/definitions/uninstallStep" 510 }, 511 "type": "array" 512 }, 513 "upgrade": { 514 "items": { 515 "$ref": "#/mixin.exec/definitions/upgradeStep" 516 }, 517 "type": "array" 518 } 519 }, 520 "type": "object" 521 }, 522 "mixin.testmixin": { 523 "$schema": "http://json-schema.org/draft-07/schema#", 524 "additionalProperties": { 525 "items": { 526 "$ref": "#/mixin.testmixin/definitions/invokeStep" 527 }, 528 "type": "array" 529 }, 530 "definitions": { 531 "config": { 532 "additionalProperties": false, 533 "description": "Configuration that can be set when the mixin is declared", 534 "properties": { 535 "testmixin": { 536 "additionalProperties": false, 537 "description": "test mixin configuration", 538 "properties": { 539 "clientVersion": { 540 "description": "Version of the client to install in the bundle", 541 "type": "string" 542 } 543 }, 544 "type": "object" 545 } 546 }, 547 "type": "object" 548 }, 549 "installStep": { 550 "additionalProperties": false, 551 "properties": { 552 "testmixin": { 553 "$ref": "#/mixin.testmixin/definitions/testmixin" 554 } 555 }, 556 "required": [ 557 "testmixin" 558 ], 559 "type": "object" 560 }, 561 "invokeStep": { 562 "additionalProperties": false, 563 "properties": { 564 "testmixin": { 565 "$ref": "#/mixin.testmixin/definitions/testmixin" 566 } 567 }, 568 "required": [ 569 "testmixin" 570 ], 571 "type": "object" 572 }, 573 "testmixin": { 574 "additionalProperties": false, 575 "description": "A step that is executed by the test mixin", 576 "properties": { 577 "description": { 578 "description": "A description of the mixin step", 579 "type": "string" 580 } 581 }, 582 "required": [ 583 "description" 584 ], 585 "type": "object" 586 }, 587 "uninstallStep": { 588 "additionalProperties": false, 589 "properties": { 590 "testmixin": { 591 "$ref": "#/mixin.testmixin/definitions/testmixin" 592 } 593 }, 594 "required": [ 595 "testmixin" 596 ], 597 "type": "object" 598 }, 599 "upgradeStep": { 600 "additionalProperties": false, 601 "properties": { 602 "testmixin": { 603 "$ref": "#/mixin.testmixin/definitions/testmixin" 604 } 605 }, 606 "required": [ 607 "testmixin" 608 ], 609 "type": "object" 610 } 611 }, 612 "properties": { 613 "install": { 614 "items": { 615 "$ref": "#/mixin.testmixin/definitions/installStep" 616 }, 617 "type": "array" 618 }, 619 "uninstall": { 620 "items": { 621 "$ref": "#/mixin.testmixin/definitions/uninstallStep" 622 }, 623 "type": "array" 624 }, 625 "upgrade": { 626 "items": { 627 "$ref": "#/mixin.testmixin/definitions/upgradeStep" 628 }, 629 "type": "array" 630 } 631 }, 632 "type": "object" 633 }, 634 "properties": { 635 "credentials": { 636 "description": "Credentials to be injected into the bundle image", 637 "items": { 638 "$ref": "#/definitions/credential" 639 }, 640 "type": "array" 641 }, 642 "custom": { 643 "additionalProperties": true, 644 "description": "Custom bundle metadata", 645 "type": "object" 646 }, 647 "customActions": { 648 "additionalProperties": { 649 "$ref": "#/definitions/customAction" 650 }, 651 "type": "object" 652 }, 653 "dependencies": { 654 "additionalProperties": false, 655 "description": "Dependent bundles that must be executed with the bundle", 656 "properties": { 657 "requires": { 658 "description": "Required dependent bundles", 659 "items": { 660 "$ref": "#/definitions/dependency" 661 }, 662 "type": "array" 663 } 664 }, 665 "required": [ 666 "requires" 667 ], 668 "type": "object" 669 }, 670 "description": { 671 "description": "A description of the bundle", 672 "type": "string" 673 }, 674 "dockerfile": { 675 "description": "The relative path to a Dockerfile to use as a template during porter build", 676 "type": "string" 677 }, 678 "images": { 679 "additionalProperties": { 680 "$ref": "#/definitions/image" 681 }, 682 "type": "object" 683 }, 684 "install": { 685 "items": { 686 "anyOf": [ 687 { 688 "$ref": "#/mixin.exec/definitions/installStep" 689 }, 690 { 691 "$ref": "#/mixin.testmixin/definitions/installStep" 692 } 693 ] 694 }, 695 "type": "array" 696 }, 697 "maintainers": { 698 "description": "Bundle maintainers", 699 "items": { 700 "$ref": "#/definitions/maintainer" 701 }, 702 "type": "array" 703 }, 704 "mixins": { 705 "items": { 706 "oneOf": [ 707 { 708 "description": "Declare a mixin without configuration", 709 "enum": [ 710 "exec", 711 "testmixin" 712 ], 713 "type": "string" 714 }, 715 { 716 "$ref": "#/mixin.testmixin/definitions/config" 717 } 718 ] 719 }, 720 "type": "array" 721 }, 722 "name": { 723 "description": "The name of the bundle", 724 "type": "string" 725 }, 726 "outputs": { 727 "description": "Values that are produced by executing the bundle image", 728 "items": { 729 "$ref": "#/definitions/output" 730 }, 731 "type": "array" 732 }, 733 "parameters": { 734 "description": "Parameters that can be injected into the bundle image", 735 "items": { 736 "$ref": "#/definitions/parameter" 737 }, 738 "type": "array" 739 }, 740 "reference": { 741 "description": "The full reference to use when the bundle is published to an OCI registry", 742 "type": "string" 743 }, 744 "registry": { 745 "description": "The OCI registry to use when the bundle is published", 746 "type": "string" 747 }, 748 "required": { 749 "additionalItems": true, 750 "description": "Required extensions for this bundle", 751 "items": [ 752 { 753 "properties": { 754 "docker": { 755 "$schema": "http://json-schema.org/draft-07/schema#", 756 "additionalProperties": false, 757 "properties": { 758 "privileged": { 759 "description": "Option to set the --privileged flag when running the Docker container", 760 "type": "boolean" 761 } 762 }, 763 "type": "object" 764 } 765 }, 766 "type": [ 767 "string", 768 "object" 769 ] 770 } 771 ], 772 "type": "array", 773 "uniqueItems": true 774 }, 775 "schemaType": { 776 "default": "Bundle", 777 "description": "The resource type of the current document.", 778 "type": "string" 779 }, 780 "schemaVersion": { 781 "default": "1.0.1", 782 "description": "The version of the schema used in this file", 783 "type": "string" 784 }, 785 "state": { 786 "description": "State variables that are generated by the bundle and injected on subsequent runs.", 787 "items": { 788 "$ref": "#/definitions/stateVar" 789 }, 790 "type": "array" 791 }, 792 "uninstall": { 793 "items": { 794 "anyOf": [ 795 { 796 "$ref": "#/mixin.exec/definitions/uninstallStep" 797 }, 798 { 799 "$ref": "#/mixin.testmixin/definitions/uninstallStep" 800 } 801 ] 802 }, 803 "type": "array" 804 }, 805 "upgrade": { 806 "items": { 807 "anyOf": [ 808 { 809 "$ref": "#/mixin.exec/definitions/upgradeStep" 810 }, 811 { 812 "$ref": "#/mixin.testmixin/definitions/upgradeStep" 813 } 814 ] 815 }, 816 "type": "array" 817 }, 818 "version": { 819 "description": "The version of the bundle, uses semver", 820 "type": "string" 821 } 822 }, 823 "required": [ 824 "schemaVersion", 825 "name", 826 "mixins", 827 "install", 828 "upgrade", 829 "uninstall" 830 ], 831 "title": "Porter manifest json schema", 832 "type": "object" 833 }