This document describes the various concepts used in Porter preview environments.
A Porter preview environment essentially corresponds to a GitHub repository. Under the hood, Porter creates a GitHub environment named
preview in your GitHub repository to deploy changes via open pull requests. A list of all deployments can be viewed at
A preview environment deployment is a collection of apps and addons on Porter. For every pull request in your repository that has Porter preview environments enabled, a new deployment is created with every change to the pull request's head branch.
Environment is to a GitHub repository just like a
Deployment is to a pull request in that repository.
To enable deployments to Porter preview environments, you must add a
porter.yaml file to the root directory of your GitHub repository. A detailed reference can be found in the Porter YAML Reference document.
A resource is the basic building block of a
porter.yaml file and describes the steps to build and deploy the same to Porter. Resources contain information about the kind of Porter release they build.
A resource may depend on one or more resources. The resource(s) that a resource depends on will be executed before it.
A driver instructs a resource to act in a certain way. For example, the default driver (
deploy) can build and deploy an app or addon to Porter. On another hand, the
os-env driver helps to read environment variables from the current operating system environment.
Every driver expects a configuration section (in the form of
<resource>.config) in the
porter.yaml file. This section may be different for different drivers and provides it with the information required to carry out its operation over the resource attached to the driver.
A driver may choose to output one or more identifiers/variables that can be used by other resources to get information of a previous step.
Note: A resource can access the output of another resource only when the former depends on the latter.