The build is not being started by the logged in user. It is started by 
another user on a remote machine using some other account credentials on 
command line. It looks like following

User test1 is looged into Jenkins
User test2 is logged into some remote machine and specifies "testuser" 
credentials in command line.




On Friday, July 24, 2015 at 1:36:28 PM UTC-7, Christopher Orr wrote:
>
> On 24/07/15 22:23, Mandy wrote: 
> > I have active directory authentication on Jenkins and I am launching job 
> > remotely using the following command line 
> > 
> > curl -u  testuser:7658756hfjsdngsd8908593486 
> > http://jenkinsserver:8080/job/testjob/build?token=onlytest 
> > 
> > How can I using groovy get access to this username in the job? 
>
> The solution is essentially the same as your last question about getting 
> the IP address of a user starting a job. 
>
> If the user was started by a logged-in user, the "cause" of the build 
> will be UserCause, rather than RemoteCause: 
>
>
> https://github.com/jenkinsci/jenkins/blob/ed2988f/core/src/main/java/hudson/model/Cause.java#L374-L376
>  
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/5ff4c114-0fe2-4cf8-9bde-8059342b7f0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to