Porter Manifest File Format 1.3.0

Bundle manifest file format version 1.3.0 requires the file-sources experimental feature flag and the allow-file-downloads configuration setting.

Changes

Add files section for downloading files automatically during porter build.

  • Add files — a list of files to download during porter build. Each entry has a url (HTTP/HTTPS only) and a destination (relative path within the bundle directory).

Example

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

mixins:
  - exec

files:
  - url: https://github.com/cli/cli/releases/download/v2.40.0/gh_2.40.0_linux_amd64.tar.gz
    destination: gh.tar.gz
  - url: https://example.com/config/defaults.json
    destination: config/defaults.json

install:
  - exec:
      description: "Install myapp"
      command: ./install.sh

upgrade:
  - exec:
      description: "Upgrade myapp"
      command: ./upgrade.sh

uninstall:
  - exec:
      description: "Uninstall myapp"
      command: ./uninstall.sh

Using File Sources

Enable the feature with the --experimental flag and pass --allow-file-downloads:

export PORTER_EXPERIMENTAL=file-sources
porter build --allow-file-downloads

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

experimental = ["file-sources"]
allow-file-downloads = true