In my Jenkinsfile, I'm trying to add a environment variable to a file, however not able to do so - seems like some small syntax thing, however I've tried so many different variations.
So the parameter I want is "${params.Spec}"
, currently used like:
environment {
SPECTORUN = "${params.Spec}"
}
Then in my script
block i'm trying:
sh "echo Run:\"${params.Spec}\" >> allure-results/environment.properties"
Any help would be appreciated.
FOUND THE ANSWER HERE: How to pass variables from Jenkinsfile to shell command