If you are referring to the authtoken from build triggers, you could 
retrieve it using the jenkins cli to retrieve the config.xml for the job 
and extract the authToken element.

 <jdk>(System)</jdk>

  <authToken>xxxyyy</authToken>

  <triggers/>

  <concurrentBuild>false</concurrentBuild>


On Tuesday, March 1, 2016 at 7:13:38 PM UTC-7, Alan Evangelista wrote:
>
> I do not need help in how to call the HTTP API. Triggering a Jenkins job 
> requires the Jenkins API token;
> my question is to how to have this Jenkins API token without hardcoding it 
> in the script. The script
> is in a public git repo and I dont want the Jenkins API token available to 
> everyone.
>
> As Jenkins user and user API token are not available via Jenkins env 
> variables, the solution I found is
> to put this data in a file (always in same path) in each Jenkins slave and 
> the script opens the file
> to get the data.
>
>
> Regards,
> Alan Evangelista
>

-- 
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/249588e8-172c-4900-8acb-d0ef62a13627%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to