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

How to get output of jenkins pipeline in a specific format?

I am trying to implement Machine learning in my jenkins pipeline. For that I need output data of pipeline for each build. Some parameters that i need are: Which user triggered the pipeline Duration of pipeline Build number with its…
0
votes
0 answers

How do I execute a jenkins cli command on localhost?

I want to run this command on the jenkins server after jenkins is installed for the first time: & "C:\Program Files (x86)\Jenkins\jre\bin\java.exe" -jar 'C:\Program Files (x86)\Jenkins\war\WEB-INF\jenkins-cli.jar' -s https://localhost…
red888
  • 27,709
  • 55
  • 204
  • 392
0
votes
2 answers

Working with special character backslash in Python 3.x

I'm currently working on creating log file for Jenkins build using Python script and Jenkins API. The following function create text file of build's console output and save it into network location. I'm looking into getting file network path so…
NewUser
  • 3
  • 4
0
votes
0 answers

stage approval through API

I need to promote to next stage in multiple builds (which are on progress) through approvals. Is it possible to give pipeline stage approval through API in Jenkins using build numbers?
Jothi Lakshmi
  • 71
  • 1
  • 1
  • 2
0
votes
1 answer

Remotely build jenkins job with file parameters using restassured

I am able to trigger the job but for some reason file is not getting uploaded to the jenkins workspace. If I try that manually from jenkins job runs fine. I have tried below- 1 ) RestAssured.given() .auth().basic("USERNAME",…
ashkaps
  • 61
  • 6
0
votes
0 answers

Unable to build job in jenkinsapi module in python

I tried to build a job in jenkins using python jenkinsapi, I tried passing nested dict as a parameter to build the job, server = Jenkins(args.host, username=jenkins_credentials['user'], …
Stella
  • 11
0
votes
1 answer

Where I can get official document for Jenkins RestAPI, which list all the APIs available?

I know below few of the Jenkins RestAPI to execute script, schedule job and check status. a) https:///scriptText b) https:///job//build" c) https:///job//job//api/json But I want to perform more operations like get list of builds and build details,…
va1bhav
  • 365
  • 1
  • 5
  • 21
0
votes
1 answer

curl command renders nothing when used with JSON API

i have a jenkins JSON API that gives me a list of all jobs in jenkins https:///api/json?tree=jobs[name] this works fine in the web browser but when i use this with the curl command in the unix CLI this gives me no output. curl -u…
poobear
  • 63
  • 11
0
votes
0 answers

Getting No Module named error while executing python script using jenkins (shell commands)

I have a GitHub - python project with 2 scripts. I can run one script in Jenkins using shell command - python script_1_name.py (this script doesn't have any external packages imported). I have another script which has a external packages -…
0
votes
0 answers

Jenkins API - Unable to get jobs from specific fodler

I am trying to copy a folder(with jobs) by reading the config file of those jobs and creating jobs using those config files. I am unable to fetch the jobs in the folder. (but i am able to get all the jobs i.e jobs outside the folder and inside the…
0
votes
1 answer

Groovy Script to Update Jenkins Build Numbers in Github Organisation

I've seen mentions in Jenkins of editing the "nextBuildNumber" file to change a job's next build. However the jobs I want to bump the build number for are inside a Github Organisation folder. I've gone into the config files for the jobs on my…
Nexus490
  • 319
  • 1
  • 4
  • 14
0
votes
1 answer

Write key/value data through Jenkins API

I already use Jenkins API for some tasks in my build pipeline. Now, there is a task that I want to persist some simple dynamic data say like "50.24" for each build. Then be able to retrieve this data back in a different job. More concretely, I am…
satyajit
  • 1,470
  • 3
  • 22
  • 43
0
votes
0 answers

how to use jenkins REST to perform builds

The document indicates to perform a build with parameters, post job_url/buildWithParameters?par=val and to build with polling SCM, post job_url/polling Is it possible to have both, polling with parameters, if yes, what is the syntax?
Heinz
  • 913
  • 4
  • 12
  • 22
0
votes
1 answer

Jenkins remote API - wait for build to finish and get output?

When using Jenkins CLI, I can use the build command with options -v and -s to run a build, waiting for it to finish and printing its output. Is there any way I can achieve the same result (wait for execution and get job output) with a single call…
willyjoker
  • 787
  • 6
  • 16
0
votes
1 answer

Jenkins xml rest API to get list of job names and last build number filtered by name

I want to get list of all job names and their last build number filtered by job name. I tried to use the following…
datastax
  • 144
  • 1
  • 2
  • 13