You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
,
an object parameter should, much like the file type parameter, be able to be
taken from a file directly when specified using the --param option in e.g. porter install.
To Reproduce
Steps to reproduce the behavior:
Use this porter.yaml:
schemaType: BundleschemaVersion: 1.0.1name: porter-reproversion: 0.1.0description: "An example Porter configuration"registry: "localhost:5000"# Declare and optionally configure the mixins used by the bundlemixins:
- execparameters:
- name: object_parametertype: objectpath: /cnab/app/object_parameter.json# Define the steps that should execute when the bundle is installedinstall:
- exec:
description: "Install Hello World"command: echoarguments:
- install ${ bundle.parameters.object_parameter }# Define the steps that should execute when the bundle is upgradedupgrade:
- exec:
description: "World 2.0"command: ./helpers.sharguments:
- upgrade# Define the steps that should execute when the bundle is uninstalleduninstall:
- exec:
description: "Uninstall Hello World"command: ./helpers.sharguments:
- uninstall
Put the following in object_parameter.json:
{
"key": "value"
}
Run porter install --param object_parameter=./object_parameter.json
Observe the error:
unable to convert parameter's object_parameter value ./object_parameter.json to the destination parameter type object: could not unmarshal value ./object_parameter.json into a json object: invalid character '.' looking for beginning of value
Expected behavior
The file should be read and marshalled into the object parameter
representation if the parameter given in the --param option is pointing to a
file.
Version
porter v1.2.0 (45c17c15)
The text was updated successfully, but these errors were encountered:
Describe the bug
According to
porter/docs/content/docs/bundle/manifest/_index.md
Line 182 in f61648f
an object parameter should, much like the
file
type parameter, be able to betaken from a file directly when specified using the
--param
option in e.g.porter install
.To Reproduce
Steps to reproduce the behavior:
Use this porter.yaml:
Put the following in
object_parameter.json
:Run
porter install --param object_parameter=./object_parameter.json
Observe the error:
Expected behavior
The file should be read and marshalled into the object parameter
representation if the parameter given in the
--param
option is pointing to afile.
Version
The text was updated successfully, but these errors were encountered: