Skip to content
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

Add failing test case for parameter with output source #2904

Closed
wants to merge 1 commit into from

Conversation

lbergnehr
Copy link
Contributor

Adding an output source to the cnab bundle specification makes the parameter disappear from porter explain.

This fails the test: TestExplain_generateTable.

TBD:

What does this change

What issue does it fix

Notes for the reviewer

Put any questions or notes for the reviewer here.

Checklist

  • Did you write tests?
  • Did you write documentation?
  • Did you change porter.yaml or a storage document record? Update the corresponding schema file.
  • If this is your first pull request, please add your name to the bottom of our Contributors list. Thank you for making Porter better! 🙇‍♀️

Reviewer Checklist

  • Comment with /azp run test-porter-release if a magefile or build script was modified
  • Comment with /azp run porter-integration if it's a non-trivial PR

This change makes it possible to access a parameter in templating, not
only to the top-level, i.e. the parameter itself, but also -- if the
parameter is of type "object" -- to access properties of the object
value. For example:

```yaml
parameters:
  - name: foo
    type: object
    default:
      a: 1
      b: 2

install:
  mymixin:
    some_property: ${ bundle.parameters.foo.a }
```

In this case, the `.a` was not possible before as `foo` was merely a
JSON string at the point of template resolution.

Signed-off-by: Leo Bergnéhr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant