mtk
mtk

Reputation: 13717

jenkins - variables not visible

I am trying to display a custom message in the e-mail that is sent after the job is built. I would like to include the svn url and another variable BranchId from where the code was checked out into the email body.

I tried SVN_URL_1 as given in the quick help on fields in the jenkins job-configure page, but it is displayed as it is in the email i.e. I get the actual string $SVN_URL_1 and not the value.

I tried adding a environment variable as shown below

Set env variable

Output is same, I get the string as is $BranchId.

Any ideas how to define such variables and use them later in email message?

Upvotes: 0

Views: 928

Answers (1)

mtk
mtk

Reputation: 13717

I was trying to display the variable as $name, but the correct syntax of displaying any env variable/ parameter passed to the job/ env variable set as above is

${ENV,var="name"}

e.g.

${ENV,var="PATH"}
${ENV,var="BranchId"}

Upvotes: 1

Related Questions