Porter Manifest File Format 1.2.0

Bundle manifest file format version 1.2.0 requires the persistent-parameters experimental feature flag.

Changes

Add persistent field to parameter definitions.

  • Add parameters.persistent which, when true, automatically wires up a matching output so the parameter value is remembered across bundle executions (install → upgrade, install → uninstall).

Example

schemaVersion: 1.2.0
name: myapp
version: 1.0.0
registry: localhost:5000

mixins:
  - exec

parameters:
  - name: resource-group
    type: string
    persistent: true

install:
  - exec:
      description: "Deploy to ${bundle.parameters.resource-group}"
      command: deploy.sh

upgrade:
  - exec:
      description: "Upgrade in ${bundle.parameters.resource-group}"
      command: upgrade.sh
      # resource-group is automatically provided from the install output

uninstall:
  - exec:
      description: "Remove from ${bundle.parameters.resource-group}"
      command: teardown.sh
      # resource-group is automatically provided from the install output

Using Persistent Parameters

Enable the feature with the --experimental flag:

export PORTER_EXPERIMENTAL=persistent-parameters
porter build

Or set it in ~/.porter/config.toml:

experimental = ["persistent-parameters"]

See Persisting Data Between Bundle Actions for a full guide.