Hi, I’m trying to store the result I get from a web request like so
JWT=$(curl --header “Content-Type: application/json” --request POST --data “{“Username”:”$USERNAME",“Password”:"$PASSWORD"}" $PORTAINER/auth | grep -Eo ‘[^"]{20,}’)
But I am getting the error ‘yaml: line 23: mapping values are not allowed in this context’ (Line 23 is the above mentioned line’). Is this not possible with Drone or am I doing something wrong?
.drone.yml file (Link to pastebin so it doesn’t lose formatting)
The yaml file you posted is invalid and therefore fails parsing. You can reproduce this error with any yaml parser. For example, try pasting your yaml into the following website: http://yaml-online-parser.appspot.com/
This is likely due to using reserved characters in the yaml, which requires either quoting the string and escaping reserved characters, or using a scalar value. For example:
Hi, thanks for the reply!
I did try with a validator but turns out it was giving false positives. I’ve got it working in the meantime but now I’m getting the cannot connect to docker error. I’ve tried everything suggested in the FAQ but so far no luck. Running in single machine in case that’s of any help.
sorry, that is not enough information for me to assist. To troubleshoot installation errors we require your full Drone server configuration and the command you used to start Drone (if you are using another program to start Drone, like docker-compose or kubernetes we need to see your docker-compose.yml or kuberenetes spec files respectively). We also require your debug server logs (see the docs to enable debug logging). Once all required information is provided we can then help troubleshoot.