A script generates a properties
file to work-space in an Execute shell
block in the Build
section. This file is available at work-space after script execution and in case of Failed
build (Conditional steps (multiple)
block in the Build
section) this properties file will be injected. My Jenkins job sends an E-mail (Editable Email Notification
block) in case if Failed
build and it should contains the variable from properties file but it doesn't see this variable. FYI: This block can use other environment variables.
I have cross-checked the properties file and it contains the required variable in every case.
Properties file in work-space:
Environment variable injection from properties file:
This Steps to to run if condition is met
block contains more other actions and these work fine. It means the running can reach this block.
Editable Email Notification block in Post-build:
If I check the Environment Variables
option in a build, I can see the variable:
But when I get the mail, it doesn't contain the variable:
Any idea how can I solve it or what should I change?
NOTE: The variable is unique and not really related to Gerrit
so I cannot use another variable which comes form Gerrit
. Just the name of var is a little tricky.