OK The issue was all along in the value of the CI/CD var I wished to add. It had newlines in it and that made it error.
value