Questions tagged [jenkins]

Jenkins is an open source continuous integration tool written in Java, that has packages for Linux, Mac OS X, Windows, FreeBSD and OpenBSD. The project was forked from Hudson.

The Jenkins project started life as in 2004, but the user and developer community decided to rename the project to Jenkins in early 2011 after asserted trademark claims to the name Hudson (see for questions related to the previous name).

Jenkins lets you automate many tasks, such as compilation, tests and deployments. Jobs can be scheduled using cron-like scheduling, or using triggers, such as whenever a source code repository is updated.

Jenkins is Java-based and recent versions require Java 8 (or later) on the master. The Jenkins master can manage multiple build nodes (slaves). Jobs can be run across multiple machines in order to perform jobs in parallel, distribute load, or build and test cross-platform software. Capacity can be easily added — Jenkins can automatically set up a new build slave on any SSH-accessible machine; it can even launch new machines to run jobs on, e.g. via cloud-computing or virtualisation plugins.

Jenkins supports a long list of plugins in a wide variety of categories to support different source control systems, run specialised build tools, send notifications, provide build reports and analytics, customise build workflows, etc. Many are hosted as open source under the Jenkins organisation on GitHub.

Jenkins is an open-source project with an enhanced enterprise product managed by CloudBees. The open source software is hosted on GitHub and distributed under the MIT license. There is an active development community with public documentation, getting started tutorials and a wiki. A new version is released approximately once a week, with more stable "long-term support" releases roughly every six months.

50386 questions
114
votes
7 answers

Is it possible to capture the stdout from the sh DSL command in the pipeline

For example: var output=sh "echo foo"; echo "output=$output"; I will get: output=0 So, apparently I get the exit code rather than the stdout. Is it possible to capture the stdout into a pipeline variable, such that I could get: output=foo as my…
Jesse S
  • 1,595
  • 2
  • 11
  • 10
114
votes
14 answers

"Pretty" Continuous Integration for Python

This is a slightly.. vain question, but BuildBot's output isn't particularly nice to look at.. For example, compared to.. phpUnderControl Jenkins Hudson CruiseControl.rb ..and others, BuildBot looks rather.. archaic I'm currently playing with…
dbr
  • 165,801
  • 69
  • 278
  • 343
113
votes
3 answers

Spread load evenly by using ‘H * * * *’ rather than ‘5 * * * *’

When setting up how Jenkins shoul pull changes from subversion I tried checked Poll SCM and set schedule to 5 * * * *, I get the following warning Spread load evenly by using ‘H * * * *’ rather than ‘5 * * * *’ I'm not sure what H means in this…
I'm busy coding
  • 1,648
  • 4
  • 13
  • 13
112
votes
9 answers

How do you run NUnit tests from Jenkins?

I'm looking to run automated NUnit tests for a C# application, nightly and on each commit to svn. Is this something that Jenkins-CI can do? Is there an online tutorial or how-to document which documents a similar setup that I can look at?
blueberryfields
  • 45,910
  • 28
  • 89
  • 168
111
votes
11 answers

How to write Pipeline to discard old builds?

The groovy syntax generator is NOT working for sample step properties: Set Job Properties. I've selected Discard old builds and then entered 10 in the Max # of builds to keep field and then Generate Groovy and nothing shows up. Jenkins version: 2.7
tarabyte
  • 17,837
  • 15
  • 76
  • 117
111
votes
4 answers

Failing a build in Jenkinsfile

Under certain conditions I want to fail the build. How do I do that? I tried: throw RuntimeException("Build failed for some specific reason!") This does in fact fail the build. However, the log shows the…
oillio
  • 4,748
  • 5
  • 31
  • 37
110
votes
3 answers

How can I copy & paste, or duplicate, an existing project?

I've got an existing Hudson project that is configured and working. I need to duplicate the project so that I can have the original and then change the new one so that it points to a different source control. I don't want to manually recreate the…
Derick Bailey
  • 72,004
  • 22
  • 206
  • 219
109
votes
15 answers

Update Jenkins from a war file

I have a machine with Ubuntu 12.04 and have installed Jenkins ver. 1.424.6 using apt-get based on *this guide*, but there is a new version: New version of Jenkins (1.447.2) is available for download (changelog). If I press download, I get a…
u123
  • 15,603
  • 58
  • 186
  • 303
108
votes
11 answers

Jenkins on OS X: xcodebuild gives Code Sign error

Summary: Setting up Jenkins on OS X has been made significantly easier with the most recent installer (as of 1.449 - March 9, 2012), however managing the process of code signing is still very difficult with no straightforward answer. Motivation: Run…
edelaney05
  • 6,822
  • 6
  • 41
  • 65
108
votes
9 answers

How to trigger a build only if changes happen on particular set of files

How do I tell Jenkins/Hudson to trigger a build only for changes on a particular project in my Git tree?
xavier.seignard
  • 11,254
  • 13
  • 51
  • 75
107
votes
22 answers

Jenkins / Hudson environment variables

I am running Jenkins from user jenkins thats has $PATH set to something and when I go into Jenkins web interface, in the System Properties window (http://$host/systemInfo) I see a different $PATH. I have installed Jenkins on Centos with the native…
Michael
  • 22,196
  • 33
  • 132
  • 187
107
votes
4 answers

How to get the API token for Jenkins

I am trying to use the Jenkins REST API. In the instructions it says I need to have the API key. I have looked all over the configuration pages to find it. How do I get the API key for Jenkins?
Luke101
  • 63,072
  • 85
  • 231
  • 359
106
votes
6 answers

Can't su to user jenkins after installing Jenkins

I've installed jenkins and I'm trying to get into a shell as Jenkins to add an ssh key. I can't seem to su into the jenkins user: [root@pacmandev /]# sudo su jenkins [root@pacmandev /]# whoami root [root@pacmandev /]# echo $USER root [root@pacmandev…
sfendell
  • 5,415
  • 8
  • 25
  • 26
105
votes
19 answers

The OutputPath property is not set for project

Building my Jenkins/MSBuild solution gives me this error c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(483,9): error : The OutputPath property is not set for project '.csproj'. Please check to make sure that…
Sachin Kainth
  • 45,256
  • 81
  • 201
  • 304
104
votes
8 answers

Continue Jenkins pipeline past failed stage

I have a series of stages that perform quick checks. I want to perform them all, even if there are failures. For example: stage('one') { node { sh 'exit 0' } } stage('two') { node { sh 'exit 1' // failure …
John McGehee
  • 9,117
  • 9
  • 42
  • 50