Reputation: 243
How to read string variable in Jenkins pipeline script under post block
We created a Jenkins job to run our automation scripts. I am able to read the string parameter in Jenkins pipeline script but I am not able to read in pipeline script post block.
Pipeline script - Post blog.
How to replace the highlighted value with string parameter in post block.
I am able to read the parameter using the %projectName% in the pipeline script. But the same is not working in post block.
Upvotes: 0
Views: 431
Reputation: 12255
You can use params.projectName
inside ${}
in double quoted string:
cucumber fileIncludePattern: '0.json', jsonReportDirectory: "C:/testing/newproject/domain/${params.projectName}/target"
Upvotes: 1