-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.42
When attempting to use the Extended Choice plugin to export a json config to a file, it returns a string with no double quotes in it, rendering the json invalid.
Build Log:
Machine_Settings="{"containers":[{"hostname":"EDMCT","machine_template":"local:vztmpl/debian-jessie-custom.tar.gz","memory":512,"net":[
],"node":"EDMHS0101","root_password":"asdasd","storage":"development-machines","storage_size":2,"swap":512}],"variable_host":"192.168.0.101"}"
- Create a new container (on the ssh host)
cd ~/playbooks
export JSON=${Machine_Settings}
echo $JSON > /tmp/create-lxc-instance.json
the /tmp/create-lxc-instance.json file:
{containers:[{hostname:EDMCT,machine_template:local:vztmpl/debian-jessie-custom.tar.gz,memory:512,net:[
],node:EDMHS0101,root_password:asdasd,storage:development-machines,storage_size:2,swap:512}],variable_host:192.168.0.101}
(The formatted data, but with no quotes so it is invalid json).
Perhaps I'm just going about this wrong, but I cannot seem to get a formatted json string that is usable no matter what I try. The exported data does still have the quotes, but as soon as I try to use it in the shell the quotes are gone.