Questions tagged [jenkins-api]

Jenkins provides an API that allows you to access Jenkins via REST (see http://localhost:8080/api/ of a running Jenkins) to retrieve information or interact with Jenkins.

Jenkins provides an API that allows you to access Jenkins via REST (see http://localhost:8080/api/ of a running Jenkins) to retrieve information or interact with Jenkins.

181 questions
0
votes
1 answer

Access Jenkins S3Publisher artifacts via python api or REST call?

How can we access S3Publisher artifacts via REST or python lib like jenkinsapi? I guess, I can do something like this but then I'll need to handle auth whereas all the other jenkinsapi calls have auth baked in already. from jenkinsapi.build import…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
0
votes
1 answer

jenkins api authentication failure

I am using oauth authentication for jenkins. I can successfully make api calls if i use my_user_name:api_token when my user name is explicitly configure in global security. It fails when my user name does not exist but a group which contains the…
Revanth Reddy
  • 149
  • 2
  • 9
0
votes
1 answer

Ansible slurp as private key in jenkins credential api error for json parsing?

I have jenkins setup, now I want to add node to jenkins, I am following the steps in How-to-Connect-to-Remote-SSH-Slaves. There is step to create credential with slave node private key. I try to create that using jenkins api by ansible. Tasks in…
Nilesh
  • 20,521
  • 16
  • 92
  • 148
0
votes
1 answer

Jenkins api - How to get jobs currently being built filtered by parameter

I'm trying to get some information of my current jenkins instance running jobs in a bash script. What I want to do is getting a list of all the current jobs running given a parameter. Something like (this doesn't…
XorX
  • 238
  • 2
  • 5
  • 19
0
votes
1 answer

Groovy script to call Python and batch file

I wish to send email containing build status of all child job. Therefore, I have used batch and python script to prepare the html file, which I will be importing in Editable Email Notification plugin. However, in Pre Send script tab, we can only…
0
votes
3 answers

How can I find the jenkins job that were last build 30 days ago

Team, I want to find out the jobs in jenkins that were build 30 days ago and have not build since 30 days. Is there any rest api or something like that which can help me to do that.
Cloudy
  • 165
  • 1
  • 3
  • 13
0
votes
1 answer

How to fetch a report generated by findbugs on Jenkins server?

I need to maintain a record of how many bugs are introduces or reduced after some checkin with automation for which I need access to the reports generated by FindBugs. I am able to get the report of SonarQube using rest API but I can't figure out a…
Manas
  • 177
  • 3
  • 13
0
votes
3 answers

Use jq to grab specific key:value pair from nth object in a JSON array

Using this JSON taken from a Jenkins build api call via curl { "_class" : "org.jenkinsci.plugins.workflow.job.WorkflowRun", "actions" : [ { "_class" : "hudson.model.CauseAction", "causes" : [ { …
Wimateeka
  • 2,474
  • 2
  • 16
  • 32
0
votes
2 answers

Adding Global Password to Jenkins with init.groovy

How can I add a global passwords to Jenkins through the init.groovy that runs at startup? To be clear, in the Manage Jenkins -> Configure Jenkins page, there is a section titled "Global Passwords". I would like to add entries in that section via…
Victor 'Chris' Cabral
  • 2,135
  • 1
  • 16
  • 33
0
votes
0 answers

How should I start setting up a javascript that gathers information and shows it in an generated html file

This is my first javascript project and I am aware that I just don't know some pretty basic things. I want to build a html file with javascript that shows the status of some jenkins jobs What would be a way to start this project. Currently I am…
0
votes
0 answers

Jenkins get sha256 for an artifact

I would like to download an artifact from a Jenkins job. While this is straight-forward, I also, in advance, need a sha256 of the artifact but could not find a way yet, to retrieve it. So question is - is there any way to get the hash or at least a…
abergmeier
  • 13,224
  • 13
  • 64
  • 120
0
votes
2 answers

Jenkins API response tuning

We have built a dashboard on top of Jenkins which enables users to see only jobs relevant to the project and also trigger a build. The UI is built using reactJS and the backend is JAVA REST WebServices. WebService calls the Jenkins api to fetch Job…
Upen
  • 1,388
  • 1
  • 22
  • 49
0
votes
1 answer

Python-jenkins API call to reconfig job not working

I am currently using the jenkins-python API to connect to my jenkins server, get a job's info, and get a job's configuration xml all through this API successfully. I am attempting to edit a part of that configuration xml and then push it back up to…
warlord786
  • 23
  • 3
0
votes
1 answer

Jenkins script to update job config: restricted agent and using docker container

I'm using a Jenkins script to update several jobs. I'm able to update the description, SCM credentials, and so on. But I can't find how to : a) unset the option to restrict the agent (restrict where this project can be run) b) set the option…
Neoh59
  • 53
  • 8
0
votes
1 answer

Getting current build number in jenkins using python

I have a python script from which I am trying to get the current build number of a job in jenkins. Below script gives the last build number and whether the build is success or failure. How can I get the current build number? I mean when I run this…
Krishna Prasad
  • 71
  • 1
  • 4
  • 13