def NAMESPACE = "Dev"
def BODY= sh(
script:'''body=$(cat <<-EOF
{
"name": "${NAMESPACE}",
"type": "regularwebapp"
}
EOF
)
(echo $body)''',
returnStdout: true
).trim()
The above doesnt work, output is as follows:
{
"name": "",
"type": "regularwebapp"
}