1

I am using an Environment Variable so that that it can be modified and Recipient List will consume that environment variable.

So this value is passed as a build parameter: enter image description here

Followed to that I am modifying it. Just as an example:

enter image description here

Now I am accessing this value in the recipient list: enter image description here

Unfortunately Jenkins is not able to get this new value. It is using the old value. How this behavior can be fixed?

Exploring
  • 2,493
  • 11
  • 56
  • 97

1 Answers1

4

We need to use the EnvInject Plugin. One of the features is a build step that allows you to "inject" parameters into the build job from a settings file.

Create a property for the email list in the env.properties file:

echo "email_list=`dummy@test.com`"> env.properties

It will create the properties file in the job workspace directory.

env.properties

In Recipient list access this variable using the following:

"$email_list"
samy
  • 14,832
  • 2
  • 54
  • 82
Iker Aguayo
  • 3,980
  • 4
  • 37
  • 49