Questions tagged [hudson-api]

The Hudson API provides you to communicate with its basic functionalities via REST.

You can use the API with

  • XML
  • JSON with JSONP support
  • Python

to do things like

  • retrieve information from Hudson for programmatic consumption
  • trigger a new build
  • create/copy jobs

Just try it on your houdson server e.g. http://yourhudsonserver/api/ or http://yourhudsonserver/job/foo/lastSuccessfulBuild/api/

For further documentation have a look at the Hudson Remote access API.

42 questions
22
votes
6 answers

Determine if given job is currently running using Hudson/Jenkins API

Is there an API to determine whether a given job is currently running or not? Ideally, I'd also like to be able to determine its estimated % complete and get the details of the SVN revision number and commit comment too! EDIT: I found the answer.…
dty
  • 18,795
  • 6
  • 56
  • 82
14
votes
1 answer

Commit based view of Jenkins builds

I would like to be able to present a view of Jenkins builds similar to the buildbot console view. With Jenkins out of the box, there appears to be really no good way to associate a commit with a build. You have to access the specific built to…
djs
  • 4,626
  • 2
  • 28
  • 38
12
votes
2 answers

How to configure Jenkins to build project from different branches in Mercurial

I have a Jenkins build job with a Mercurial trigger on the default branch, which works fine for building "release candidates". This job then starts a smoke test job. We use a branch-per-feature branching scheme, so that at any given time there could…
Alistair Ward
  • 1,093
  • 9
  • 20
8
votes
2 answers

HUDSON: How to stop hudson job from command line?

I need to forcefully stop a Hudson build running in remote server. Is there a command/API to do that? for ex: to trigger a new build we can do :- HUDSON_URL/job/JOBNAME/build looking for similar API to stop the build.
girishs
  • 121
  • 1
  • 8
8
votes
3 answers

How to access Hudson job1 artifacts from another job2?

We have a production job and a nightly job for a project in Hudson. The production job needs to pull off some artifacts from a specific nightly build # (which is provided as parameter). Can anyone help us with a hint on how to achieve this?
Abhimanyu Grover
  • 319
  • 1
  • 4
  • 10
7
votes
1 answer

File upload + parameter via HTTP POST to trigger a Hudson build

Currently i'm searching for a working method to upload a file + a field in the following confiuguration of Hudson. The current problem is that Hudson always complains about a form which should be submitted..(see exception later in this post). But…
khmarbaise
  • 92,914
  • 28
  • 189
  • 235
6
votes
4 answers

Showing exception while connecting slave to master using headless jnlp

i am using jenkins 1.447.2 version.My master is linux and slave is windows Jul 27, 2012 12:44:17 PM hudson.remoting.jnlp.Main$CuiListener INFO: Hudson agent is running in headless mode. Jul 27, 2012 12:44:17 PM…
varghese
  • 131
  • 1
  • 4
  • 12
5
votes
1 answer

How to use tree query parameter in Jenkins Remote API to get downstreamProject and parameter?

I am trying to use Jenkins(Hudson) Remote API to consume XML response from a freeStyleProject. Researching about the tree query parameter in the Jenkins documentation and here I have been trying to use it to improve response times to get XML…
Ghasfarost
  • 742
  • 2
  • 8
  • 17
5
votes
4 answers

Set Hudson Build Description via Web API

I have a Python script that operates on Hudson builds and would love to be able to set the description of a build programmatically. I can click "Add Description" on a build's page and fill in the form, how can I POST some data to the same URL that…
jtb
  • 889
  • 11
  • 27
5
votes
2 answers

how to cancel build queue jobs in jenkins, which are not started by jenkins and are in its build queue through REST API

how to cancel build queue jobs in jenkins through REST API, which are not started by jenkins and are in its build queue. I know how to cancel the in-progress job with below command curl -X POST /job///doDelete…
5
votes
2 answers

How to programmatically add a job to a view in hudson

I have a Java program controlling automatically generated jobs for a set of hudson servers. It is no problem to create, delete or update job(config)s using the hudson remote API. I also managed it to create hudson views and to create a new job for a…
Uwe Krüger
  • 403
  • 1
  • 4
  • 8
4
votes
1 answer

Finding Hudson Log Files

Does anyone know how to search a Hudson server for the incremental log files that are generated from running reoccurring JUnit tests? The Hudson dash board will show the last twenty tests, but we are looking for a log file that holds a complete…
Peter Rutledge
  • 111
  • 2
  • 4
3
votes
2 answers

Hudson/jenkins: Get list of jobs who's build is older than a month

I have a hudson instance running, Where i have 100's of jobs running everyday. I want to get a list of jobs who's last successful job was x days old, so that i can disable such unwanted jobs. Example: Some jobs are there on hudson which had last…
Goutham Nithyananda
  • 871
  • 2
  • 13
  • 25
3
votes
3 answers

Get last successfull build on Hudson

I was wondering if anyone know of a way or a plug in to get the last build version with result of success from a particular Hudson job using the CLI somehow. I can see this result is held in the [DateTime]\build.xml file so I could write something…
Rubans
  • 4,188
  • 6
  • 40
  • 58
2
votes
0 answers

Using UserNameResolver in Jenkins / Hudson

I'm trying to write a plugin that provides users' real name and email addresses from the data in our Active Directory. We use the ActiveDirectory plugin for authentication, which does not set these values (and, as far as I can tell, is unable to do…
Daniel Beck
  • 6,363
  • 3
  • 35
  • 42
1
2 3