Questions tagged [jenkins]

For questions about Jenkins, an open source automation server, and using Jenkins for topics such as building, testing, and deploying software, etc. For questions specifically about Jenkins Plugins use the jenkins-plugins tag.

From Jenkins Documentation:

Jenkins is a self-contained, open source automation server which can be used to automate all sorts of tasks such as building, testing, and deploying software. Jenkins can be installed through native system packages, Docker, or even run standalone by any machine with the Java Runtime Environment installed.

Jenkins is one of the more popular systems for continuous integration and many are available that extend the out-of-the-box functionality. Jenkins is actually a fork of the product and was created because the developers feared a dispute with Oracle about the Hudson trademark.

Usage:

Use this tag for questions about Jenkins in general, or about using Jenkins for tasks like building, testing and deploying software. For questions specifically about writing or using 3rd party Jenkins plugins, please use the tag.

655 questions
111
votes
7 answers

Cleanest way to prematurely exit a Jenkins Pipeline job as a success?

I have a job that will create files, unless one of the values being fed to it matches an older value. What's the cleanest way in Jenkins to abort or exit the job, without it being FAILED? It exiting is the correct behavior so I want the build marked…
Alex
  • 4,612
  • 6
  • 29
  • 49
96
votes
5 answers

How to decrypt Jenkins passwords from credentials.xml?

I've taken over the project where a lot of Jenkins credentials has passwords or passphrase strings which I need to know in order to progress with the project, unfortunately these weren't documented anywhere. I've checked the credentials.xml file…
kenorb
  • 8,011
  • 14
  • 43
  • 80
76
votes
9 answers

How do you back up Jenkins jobs & master configs?

I'd like to backup all Jenkins jobs and config files. What's the easiest way of doing it?
kenorb
  • 8,011
  • 14
  • 43
  • 80
41
votes
7 answers

How to safe restart Jenkins?

I need to make some configuration changes on our Jenkins instance that will involve restarting Jenkins a couple of times. However, our developers are committing frequently enough that I haven't seen Jenkins without jobs running in three days. Is…
Alex
  • 4,612
  • 6
  • 29
  • 49
40
votes
4 answers

How can we get the jenkins console output in a text file?

How can i get the Jenkins console output in a text file? I want to share it with someone, is there any way to do it?
Jay
  • 1,064
  • 2
  • 12
  • 21
36
votes
5 answers

How to properly achieve dynamic parallel action with a declarative pipeline?

Currently, I'm going to need an implementation that must find all files within a directory and start a parallel task for every file found. Is it possible to achieve this using declarative pipelines? pipeline { agent any stages { …
thclpr
  • 871
  • 1
  • 7
  • 9
32
votes
4 answers

How to properly scale Jenkins?

In my project we have one AWS server running Jenkins Master + 1 Jenkins slave (2 executors)... and we need more In order to augment our build power we have three options: Scale up: Make AWS instance bigger and add more executors. Scale up: Make AWS…
Oscar Foley
  • 535
  • 1
  • 5
  • 10
29
votes
3 answers

How to build a complex parallel Jenkins pipeline?

I've been interested in converting our bespoke Jenkins integrations into a pipeline. However, I can't seem to figure out how to do it. Can anyone help me with the Jenkins script that could do the following? 1---2---3-----------9---10 | …
29
votes
2 answers

How to define variable in Jenkins declarative pipeline?

I defined variable in declarative Jenkins pipeline script but having issues with simple variable declaration. Here is my script: pipeline { agent none stages { stage("first") { def foo = "foo" // fails with…
Jay
  • 1,064
  • 2
  • 12
  • 21
28
votes
3 answers

Set a Jenkins job to not to clone the repo in SCM

I have integrated Jenkins with Bitbucket using the Bitbucket Plugin. As per the plugin's Wiki, a given job will be triggered if the repository is set in the SCM of the job. As you know, if one set SCM in a Jenkins job, this is cloned in pre-build…
Héctor Valverde
  • 383
  • 1
  • 3
  • 8
25
votes
6 answers

Jenkins Health Check URL

I'm planning to supervise services by periodically checking if they are up and running, Jenkins is our central orchestration tool and must be running with near zero downtime. How can I check health status of a Jenkins server - By health status I…
storm
  • 1,759
  • 3
  • 16
  • 34
24
votes
3 answers

Running a background process in Pipeline job

I am looking for a way to run a java process in background using Jenkins declarative pipeline. Below is the snippet of code stage('Deploy'){ steps{ script{ withEnv(['BUILD_ID=dontkill']) { sh…
Dharanidhar
  • 701
  • 2
  • 5
  • 10
23
votes
2 answers

Is it possible to upgrade Jenkins from Jenkins it-self?

On Manage Jenkins I've a message that: New version of Jenkins (2.47) is available for download (changelog). Is there any way of upgrading Jenkins from the GUI similar as it's done for the plugins? I'm using Jenkins ver. 2.43 on Linux.
kenorb
  • 8,011
  • 14
  • 43
  • 80
19
votes
4 answers

Best Practices for a multi environment deployment using Jenkins

I have 3 environments, each on their own Virtual Network with their own configurations. Do I need to have 3 separate instances of Jenkins if I am to do Continuous Deployments on each of the environments? What are some best practices regrading…
19
votes
1 answer

What is the difference between Jenkin's `Replay` and `Rebuild` options?

If you want to re-run a Jenkins job, you can click the Rebuild button which sometimes appears as the Replay button. What is the difference Rebuilding a job versus Replaying it? Why is it that some jobs display Replay while others display Rebuild?
Wimateeka
  • 398
  • 1
  • 2
  • 9
1
2 3
43 44