-
Notifications
You must be signed in to change notification settings - Fork 220
feat: add persistent parameter shorthand #3574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kichristensen
merged 10 commits into
getporter:main
from
kichristensen:persistentParameters
Mar 30, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
b9668d3
feat: add persistent parameter shorthand
kichristensen 4cbbc56
docs: add persistent parameters docs
kichristensen 45db8f1
fix: enable persistent params flag at runtime
kichristensen 3340f52
fix: remove redundant Config embedded field selector
kichristensen 69c7113
docs: clarify runtime flag comment in Run()
kichristensen 932c1b5
fix: require schemaVersion 1.2.0 for persistent params
kichristensen 17fb0cc
fix: derive schema constraint from SupportedSchemaVersions
kichristensen fba50a3
docs: add persistent-parameters experimental flag entry
kichristensen 257b5eb
fix: allow deps-v2 on schema >= 1.1.0
kichristensen c80b795
Merge branch 'main' into persistentParameters
kichristensen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| --- | ||
| title: Porter Manifest File Format 1.2.0 | ||
| description: The 1.2.0 file format for the Porter manifest, porter.yaml | ||
| layout: single | ||
| --- | ||
|
|
||
| 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 | ||
|
|
||
| ```yaml | ||
| 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: | ||
|
|
||
| ```console | ||
| export PORTER_EXPERIMENTAL=persistent-parameters | ||
| porter build | ||
|
kichristensen marked this conversation as resolved.
|
||
| ``` | ||
|
|
||
| Or set it in `~/.porter/config.toml`: | ||
|
|
||
| ```toml | ||
| experimental = ["persistent-parameters"] | ||
| ``` | ||
|
|
||
| See [Persisting Data Between Bundle Actions] for a full guide. | ||
|
|
||
| [experimental feature flag]: /docs/configuration/configuration/#experimental | ||
| [Persisting Data Between Bundle Actions]: /docs/development/authoring-a-bundle/persisting-data/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.