I need to change a pod definition for Jenkins to be in YAML format so that I can add privileged.
I have a map already defined, if I can add one more attribute and convert it to yaml, it would be done. The problem is that writeYaml can't send the output to a text variable, and I can't write to a temp file because I don't have my pod defined yet.
First, why is writeYaml purposely limited to not output to a variable? readYaml can read from a text variable. I've run into other cases where I have to do an ugly hack of writing the output to a file, and then using readFile()
Does anyone have any examples of how to use the actual SnakeYaml library in Jenkins?