get.porter.sh/porter@v1.3.0/pkg/schema/manifest.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          "parameters": {
   177            "description": "Map of parameter names to a parameter source, such as bundle.parameters.PARAM, bundle.dependencies.DEP.outputs.OUTPUT, or bundle.credentials.CRED",
   178            "type": "object",
   179            "additionalProperties": {
   180              "type": "string"
   181            }
   182          }
   183        },
   184        "required": [
   185          "name",
   186          "bundle"
   187        ],
   188        "type": "object"
   189      },
   190      "bundle": {
   191        "description": "The definition of a bundle reference",
   192        "properties": {
   193          "reference": {
   194            "description": "The full bundle reference for the dependency in the format REGISTRY/NAME:TAG",
   195            "type": "string"
   196          },
   197          "version": {
   198            "description": "Bundle version constraint for version matching, see https://github.com/Masterminds/semver/blob/master/README.md#checking-version-constraints",
   199            "type": "string"
   200          }
   201        },
   202        "required": [
   203          "reference"
   204        ],
   205        "type": "object"
   206      },
   207      "customAction": {
   208        "type": "object",
   209        "properties": {
   210          "description": {
   211            "type": "string",
   212            "description": "A description of the custom action"
   213          },
   214          "modifies": {
   215            "type": "boolean",
   216            "description": "Specifies that the action will modify resources in any way."
   217          },
   218          "stateless": {
   219            "type": "boolean",
   220            "description": "Specifies that the action does not act on a claim, and does not require credentials."
   221          }
   222        },
   223        "additionalProperties": false
   224      },
   225      "image": {
   226        "description": "An image represents an application image used in a bundle",
   227        "type": "object",
   228        "properties": {
   229          "description": {
   230            "description": "A user-friendly description of this image",
   231            "type": "string"
   232          },
   233          "imageType": {
   234            "description": "The type of this image, i.e. docker",
   235            "type": "string"
   236          },
   237          "repository": {
   238            "description": "The repository portion of the image reference, i.e. deislabs/coolapp",
   239            "type": "string"
   240          },
   241          "digest": {
   242            "description": "The content digest of the image, i.e. sha256:cafebabe...",
   243            "type": "string"
   244          },
   245          "size": {
   246            "description": "The size of the image",
   247            "type": "integer"
   248          },
   249          "mediaType": {
   250            "description": "The media type of the image",
   251            "type": "string"
   252          },
   253          "tag": {
   254            "description": "The tag the image",
   255            "type": "string"
   256          },
   257          "labels": {
   258            "description": "Key/value pairs that used to specify identifying attributes of images",
   259            "type": "object",
   260            "additionalProperties": {
   261              "type": "string"
   262            }
   263          }
   264        },
   265        "required": [
   266          "repository"
   267        ],
   268        "additionalProperties": false
   269      },
   270      "maintainer": {
   271        "additionalProperties": false,
   272        "description": "Bundle Maintainer",
   273        "properties": {
   274          "email": {
   275            "description": "Email of the maintainer",
   276            "type": "string"
   277          },
   278          "name": {
   279            "description": "Name of the maintainer",
   280            "type": "string"
   281          },
   282          "url": {
   283            "description": "Url of the maintainer",
   284            "type": "string"
   285          }
   286        },
   287        "type": "object"
   288      }
   289    },
   290    "properties": {
   291      "schemaType": {
   292        "description": "The resource type of the current document.",
   293        "type": "string",
   294        "default": "Bundle"
   295      },
   296      "schemaVersion": {
   297        "description": "The version of the schema used in this file",
   298        "type": "string",
   299        "default": "1.0.1"
   300      },
   301      "credentials": {
   302        "type": "array",
   303        "items": {
   304          "$ref": "#/definitions/credential"
   305        },
   306        "description": "Credentials to be injected into the bundle image"
   307      },
   308      "description": {
   309        "type": "string",
   310        "description": "A description of the bundle"
   311      },
   312      "install": {
   313        "type": "array",
   314        "items": {
   315          "anyOf": []
   316        }
   317      },
   318      "reference": {
   319        "description": "The full reference to use when the bundle is published to an OCI registry",
   320        "type": "string"
   321      },
   322      "registry": {
   323        "description": "The OCI registry to use when the bundle is published",
   324        "type": "string"
   325      },
   326      "mixins": {
   327        "type": "array",
   328        "items": {
   329          "oneOf": [
   330            {
   331              "description": "Declare a mixin without configuration",
   332              "type": "string",
   333              "enum": []
   334            }
   335          ]
   336        }
   337      },
   338      "name": {
   339        "type": "string",
   340        "description": "The name of the bundle"
   341      },
   342      "outputs": {
   343        "type": "array",
   344        "items": {
   345          "$ref": "#/definitions/output"
   346        },
   347        "description": "Values that are produced by executing the bundle image"
   348      },
   349      "parameters": {
   350        "type": "array",
   351        "items": {
   352          "$ref": "#/definitions/parameter"
   353        },
   354        "description": "Parameters that can be injected into the bundle image"
   355      },
   356      "state": {
   357        "description": "State variables that are generated by the bundle and injected on subsequent runs.",
   358        "type": "array",
   359        "items": {
   360          "$ref": "#/definitions/stateVar"
   361        }
   362      },
   363      "dependencies": {
   364        "additionalProperties": false,
   365        "description": "Dependent bundles that must be executed with the bundle",
   366        "properties": {
   367          "requires": {
   368            "description": "Required dependent bundles",
   369            "items": {
   370              "$ref": "#/definitions/dependency"
   371            },
   372            "type": "array"
   373          }
   374        },
   375        "required": [
   376          "requires"
   377        ],
   378        "type": "object"
   379      },
   380      "required": {
   381        "description": "Required extensions for this bundle",
   382        "type": "array",
   383        "items": [
   384          {
   385            "type": [
   386              "string",
   387              "object"
   388            ],
   389            "properties": {
   390              "docker": {
   391                "$schema": "http://json-schema.org/draft-07/schema#",
   392                "type": "object",
   393                "properties": {
   394                  "privileged": {
   395                    "description": "Option to set the --privileged flag when running the Docker container",
   396                    "type": "boolean"
   397                  }
   398                },
   399                "additionalProperties": false
   400              }
   401            }
   402          }
   403        ],
   404        "uniqueItems": true,
   405        "additionalItems": true
   406      },
   407      "uninstall": {
   408        "type": "array",
   409        "items": {
   410          "anyOf": []
   411        }
   412      },
   413      "upgrade": {
   414        "type": "array",
   415        "items": {
   416          "anyOf": []
   417        }
   418      },
   419      "version": {
   420        "type": "string",
   421        "description": "The version of the bundle, uses semver"
   422      },
   423      "dockerfile": {
   424        "type": "string",
   425        "description": "The relative path to a Dockerfile to use as a template during porter build"
   426      },
   427      "customActions": {
   428        "type": "object",
   429        "additionalProperties": {
   430          "$ref": "#/definitions/customAction"
   431        }
   432      },
   433      "images": {
   434        "type": "object",
   435        "additionalProperties": {
   436          "$ref": "#/definitions/image"
   437        }
   438      },
   439      "custom": {
   440        "description": "Custom bundle metadata",
   441        "type": "object",
   442        "additionalProperties": true
   443      },
   444      "maintainers": {
   445        "description": "Bundle maintainers",
   446        "items": {
   447          "$ref": "#/definitions/maintainer"
   448        },
   449        "type": "array"
   450      }
   451    },
   452    "additionalProperties": {
   453      "type": "array",
   454      "items": {
   455        "anyOf": []
   456      }
   457    },
   458    "required": [
   459      "schemaVersion",
   460      "name",
   461      "mixins",
   462      "install",
   463      "upgrade",
   464      "uninstall"
   465    ]
   466  }