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
13
votes
2 answers

In Jenkins: pip install from git repo using SSH keys

In my Jenkins job, during the build phase, I execute pip install -r requirements.txt. Among my project's requirements, there are some paths to private git repositories, needing SSH keys to authenticate. I already created the keys (no passphrase),…
Eran Zimmerman Gonen
  • 4,375
  • 1
  • 19
  • 31
13
votes
2 answers

Reconfigure and reboot a Hudson/Jenkins slave as part of a build

I have a Jenkins (Hudson) server setup that runs tests on a variety of slave machines. What I want to do is reconfigure the slave (using remote APIs), reboot the slave so that he changes take effect, then continue with the rest of the test. There…
Jason Swager
  • 6,421
  • 6
  • 41
  • 56
13
votes
2 answers

Where does the JNLP secret come from?

I am in the process of connecting a static slave to Jenkins master. The command Im going to use is : java -jar /slave.jar -jnlpUrl $JENKINS_MASTER_URL -secret $JNLP_SECRET My question is where does the $JNLP_SECRET secret come from ? If its…
user4889345
13
votes
2 answers

Can Jenkins scripted pipeline disable concurrent builds?

I am switching my Declarative Jenkins pipeline to a scripted Jenkins pipeline. However, the 'options' direction I was using previously to disableConcurrentBuilds() does not seem to be available for scripted pipelines according to the Jenkins…
A. Dickey
  • 141
  • 1
  • 1
  • 6
13
votes
2 answers

'dotnet build' command not finding NuGet packages (they exist)

I'm trying to build my .NET Core 2.1 application from the command-line on my Jenkins server. It builds fine on my local machine (Windows 10, Visual Studio 2017 Enterprise), and if I manually build it on the server Jenkins is running on (manually…
ihendriks
  • 413
  • 1
  • 3
  • 8
13
votes
1 answer

What's the pattern evaluation on Jenkinsfile when-branch setting?

I am trying to detect the branch pattern on a when statement inside a stage. Like this: stage('deploy to staging') { agent label:'some-node' when { branch "feature/*" } steps { sh './deploy_pr.sh' } } What if I want a more complicated…
c4sh
  • 701
  • 1
  • 8
  • 22
13
votes
4 answers

How to run Jest tests with Yarn without any prompts?

I am trying to run my Jest unit tests in Team City but I always end up getting the prompt as shown below. No tests found related to files changed since last commit. Press `a` to run all tests, or run Jest with `--watchAll`. Watch Usage › Press a…
AnOldSoul
  • 4,017
  • 12
  • 57
  • 118
13
votes
2 answers

Access which stage failed in previous Jenkins build

I have written a Jenkinsfile script which gets whether documents are updated or code is updated in the current Github commit and starts all the stages accordingly. If only documents are updated I don't run the code testing stage again. So now if the…
Pranav Bhagwat
  • 287
  • 2
  • 11
13
votes
4 answers

Jenkins multi-branch pipeline missing a branch

I have a Jenkins system. It runs build jobs for our company. We run multibranch pipelines. Yesterday one of the builds mysteriously dropped the devel branch from the build. I looked through the Pull Requests for the branch and I can not find…
Mark Russell
  • 159
  • 1
  • 1
  • 7
13
votes
1 answer

What does "Export CI=true" do in this create-react-app deploy script?

There's a file called launch.sh in our Create React App, that is used to publish things to the CDN. One of the lines in there says export CI=true. I have no idea what "CI" means in this context, and what it does.
Physix
  • 171
  • 1
  • 1
  • 5
13
votes
1 answer

Conditionally trigger Jenkins multibranch pipeline

I have a parameterized Jenkins multibranch pipeline using a GitHub repo as the source for a Jenkinsfile and some scripts. The pipeline is configured to trigger on webhooks for branches and pull requests but I also want a parameterized cron trigger…
Zach Weg
  • 1,553
  • 11
  • 13
13
votes
1 answer

"java.lang.NoSuchMethodError: No such DSL method 'pipeline' found" when running declarative JenkinsFile from SCM

We have a very simple Jenkinsfile written in the declarative style: pipeline { agent any stages { stage('Test') { steps { echo "hello" } } } } When we run it directly from within…
Andrew Harmel-Law
  • 7,739
  • 12
  • 44
  • 55
13
votes
1 answer

How to allocate more memory to my Virtual Machine running on Fedora to avoid Heap out of Memory Error

I'm running Jenkins on a Fedora Virtual Machine and have an app created by create-react-app . When I try to build for production on my local machine, after ~8 minutes, it does get compiled successfully (although with the message: 'the bundle size…
Ray Kim
  • 1,931
  • 1
  • 13
  • 25
13
votes
2 answers

Can I use a Closure to define a stage in a Jenkins Declarative Pipeline?

I'm trying to do something like this: def makeStage = { stage('a') { steps { echo 'Hello World' } } } pipeline { agent none stages { makeStage() } } But it gives me this exception: WorkflowScript: 11: Expected a stage @…
Will Brode
  • 1,026
  • 2
  • 10
  • 27
13
votes
4 answers

How to get latest build number from another job in jenkins pipeline

I am using jenkins pipeline 2.0, and I would like to get another job's latest successful build number. What's the pipeline syntax to use?
王子1986
  • 3,019
  • 4
  • 31
  • 43