Reputation: 2148
I want to add some parameters from the web hooks into the mail sent from the Jenkins. I tried solutions provided in StackOverflow and elsewhere. No success yet.
I have the following in place:
This is a parameterized build
http://JENKINS_URL/job/android02/buildWithParameters?token=<My Token>&PARAM=<My Custom Params>
${PARAM}
, $PARAM
.
PARAM
, it is correctly displayed in the mail I receive. I tried http://JENKINS_URL/job/android02/build?token=<My Token>&PARAM=<My Custom Params>
URL as well thinking just in case if it works. The mail is sent as Editable email Notification
config. Basically, everything is working except that I'm not able to access the custom parameters I have passed via Trigger builds remotely
option.
Edit1:
If I keep a default value, say, test
for the parameter, PARAM
, in the mail received, I can see test
displayed. But I need to get the value I'm passing in the build script.
Upvotes: 1
Views: 1269
Reputation: 16346
From the "tool tip" that you get when you click on the question mark next to "":
${ENV,var="VARIABLENAME"}
Expands to an environment variable (specified here as VARIABLENAME) from the build environment. Note that this does not include any variables set by the build scripts themselves, only those set by Jenkins and other plugins.
So, use ${ENV,var="PARAM"}
.
Upvotes: 1