Discussion:
How to SET BUILD_USER variable from REMOTE API CALL to Jenkins Job
rohit verma
2018-11-16 10:57:23 UTC
Permalink
Hello,

I am calling a Jenkins Job from remote system by following command.

curl -k -v -H -XPOST
"https://<USERNAME>:<AuthToken>@JenkinsURL/job/JobName/buildWithParameters?token=TokenName&PRM=PRM_VALUE"


What i noticed that the environment variable BUILD_USER is not set via
remote API call. (In my case BUILD_USER is null however the user is
triggering it with his/her authentication token). Is there a way to make
sure that BUILD_USER is set to the the user name of the caller of this job
via REST Like API (Curl command)?


Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b3a8235e-dd7f-49c3-ae61-ba6360a70b55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Cuong Tran
2018-11-16 21:56:56 UTC
Permalink
I don't think Jenkins has BUILD_USER var. If you're using a plugin to
generate it, you may want to check there.
Post by rohit verma
Hello,
I am calling a Jenkins Job from remote system by following command.
curl -k -v -H -XPOST
What i noticed that the environment variable BUILD_USER is not set via
remote API call. (In my case BUILD_USER is null however the user is
triggering it with his/her authentication token). Is there a way to make
sure that BUILD_USER is set to the the user name of the caller of this job
via REST Like API (Curl command)?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8c9e36db-0c71-48ba-87e9-bdc76f12dfc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
rohit verma
2018-11-19 14:10:51 UTC
Permalink
I am using the user build vars plugin which has this variable. This
variable is normally set to the user name while you execute the jenkins job
normally from build the project option while when i call it via rest api
like curl command with a user name and his authentication token it’s not
being set to the user name. Instead it’s null.

Kr
Rohit
Post by Cuong Tran
I don't think Jenkins has BUILD_USER var. If you're using a plugin to
generate it, you may want to check there.
Post by rohit verma
Hello,
I am calling a Jenkins Job from remote system by following command.
curl -k -v -H -XPOST "https://
What i noticed that the environment variable BUILD_USER is not set via
remote API call. (In my case BUILD_USER is null however the user is
triggering it with his/her authentication token). Is there a way to make
sure that BUILD_USER is set to the the user name of the caller of this job
via REST Like API (Curl command)?
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/8c9e36db-0c71-48ba-87e9-bdc76f12dfc2%40googlegroups.com
<https://groups.google.com/d/msgid/jenkinsci-users/8c9e36db-0c71-48ba-87e9-bdc76f12dfc2%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAH4QvPZ_NCgyJyPuHeDsvc9Rb6Lx_LBAfnCWz6FFGTJauRAY8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...