I recommend posting jsonnet syntax questions (or in this case jsonnet escaping) to stackoverflow using the jsonnet tag. The jsonnet folks should be able to help clear up any questions related to escaping.
Thank you for your response! @sbarzowski in the issue thread I linked argues that it’s impossible and useless to generate such a string from jsonnet. And this is a problem.
in jsonnet generates a valid yaml via ‘drone jsonnet’ which executes properly via ‘drone exec’.
If I use that generated yaml by committing it to the repo it works properly, although if I try to rely on jsonnet or starlark the substitution doesn’t happen. Interestingly only the replace substitution fails, others work properly with a generated pipeline.