There's probably some rational for how shell commands are passed from the pipeline sh action into the actual shell, but I've no clue what it is. I've read a lot of responses to people with similar issues, and I still can't get this command.to work...
docker images -a | grep '<none>' | awk '{print $3}' | xargs docker rmi
It should not be this hard. I've tried encasing in double quotes and escaping single quotes, encasing in single quotes and escaping double quotes, escaping the dollar sign, hours worth of combinations. There should be a simple 'take this string as literal, really really, as literal' syntax.
Someone who knows how this works want to tell me how to put this command, which deletes untagged docker images, into the sh() action in a way which will actually do that?
All help appreciated.