porter
porter copied to clipboard
Can't default a file parameter with a filepath
Describe the bug
This is a gap in our implementation of the custom file
parameter type. The underlying type is actually a base64 encoded string. Currently that is accidentally leaked to the user by default
which doesn't accept a filepath, only ""
or a base64 encoded string.
To Reproduce
- Create a bundle with a file type parameter
- Make the parameter optional by specifying a default
- Try to run the bundle and you get an error.
parameters:
- name: myparam
type: file
default: defaultParam.txt # located in the bundle at defaultParam.txt, next to the porter.yaml file
Expected behavior
The default value should be read from filepath specified (which refers to a location relative to porter.yaml) and embed the base64 encoded value in the bundle definition.
Porter Command and Output
$ porter install
Error: unable to decode parameter publicIP: illegal base64 data at input byte 63
Error: 1 error occurred:
* container exit code: 1, message: <nil>
Version
v0.30.1