I would like to extract the value of an environment variable and put it in my Editable Email Notification's subject line. I tried with ${ENV,var="MY_ENV_VARIABLE"}
, but that simply returns an empty string in the email subject.
Please note, I'm setting MY_ENV_VARIABLE
inside my build step (Execute shell) by adding a command export MY_ENV_VARIABLE="some value"
.
Please help.
This answer helped me. Here's what I did:
export MY_ENV_VARIABLE=my_value
from my build step.MY_ENV_VARIABLE=my_value
in the
"Properties Content" text box.${ENV, var="MY_ENV_VARIABLE"}
in my email's subject in Jenkins.The email subject now shows the value of MY_ENV_VARIABLE
.