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.

Filter by
Sorted by
Tagged with
71 votes
8 answers
129k views

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?
user avatar
  • 7,121
19 votes
2 answers
75k views

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") { ...
user avatar
  • 854
5 votes
1 answer
99 views

How to run a container from within another container while also mounting a volume from the first container?

I'm running a build in Jenkins which is running inside Kubernetes. When the job starts, a container starts in the cluster and the build runs inside it. A step in the build requires building an RPM ...
user avatar
0 votes
1 answer
928 views

How to set git-lfs as an additional checkout behavior using the JCAC plugin?

We are using the Jenkins Configuration As Code (JCAC) plugin to automate the jenkins configuration. One of the challenges is to set git-lfs as an additional checkout behavior. GitLFSPull has to be ...
user avatar
  • 12.6k
77 votes
5 answers
111k views

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 ...
user avatar
  • 7,121
32 votes
4 answers
48k views

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? ...
user avatar
  • 811
38 votes
7 answers
85k views

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 ...
user avatar
  • 4,152
26 votes
3 answers
35k views

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 ...
user avatar
17 votes
2 answers
20k views

Triggering specific pipeline builds for monorepos in Jenkins

I'm in the process of converting multiple repositories into a single repository, our CI tool of choice is Jenkins due to the conversion of multiple repository structures into a single one 2 main ...
user avatar
13 votes
1 answer
2k views

Testing Jenkins jobs and pipelines

Currently, we have a fair number of Jenkins jobs and pipelines for builds, testing, deployments and other automated activities. Every time we change or add a new job, we only test it manually - e. g. ...
user avatar
  • 829
8 votes
1 answer
14k views

How not to break Jenkins Pipeline when adding new parameters (declarative pipeline)

An Issue I have been struggling with is whenever I add a new parameter to a Jenkins Pipeline, the next job will not correctly get this parameter. This is especially an issue if those parameters are ...
user avatar
16 votes
3 answers
16k views

One Jenkinsfile or multiple?

So I have a Jenkinsfile defining a build pipeline and then a Jenkins job (not pipeline) with a very simple deployment script for our Docker stacks. Seeing that Jenkinsfiles can become as complex and ...
user avatar
  • 629
8 votes
2 answers
8k views

How to check out GitHub repo after specifying skipDefaultCheckout in Jenkins declarative pipeline?

I have a Jenkins pipeline in which I build in one stage and test in another. I'd like them to be different machines since they have different capabilities. I have something like the following so far: ...
user avatar
  • 181
10 votes
2 answers
373 views

Key attributes of Continuous Integration (CI) software

I work in the IT department of automation/dev company and we are just about to implement/add CI into our set of tools. And we are having difficulties to choose the one. At the moment we've been ...
user avatar
18 votes
3 answers
6k views

Which SCM tools does Jenkins support?

I'm aware that Jenkins supports Git and SVN. What other SCM tools does Jenkins support?
user avatar
  • 7,121
14 votes
3 answers
9k views

How to not "fire and forget" when doing a remote trigger of a Jenkins build?

I am attempting to trigger a parameterized Jenkins build from Bamboo, doing the below: POST - http://jenkins-url.com/job/jobname/buildWithParameters?ENVIRONMENT=dev&APPLICATION=hello-world ...
user avatar
  • 309
6 votes
3 answers
1k views

Why trigger something remotely (using Jenkins) and then just forget about it?

When using Jenkins to trigger some process (eg a remote build) at a remote location, why would you ever want to "fire" something, and then just "forget" about the outcome of what got triggered ...
user avatar
  • 6,963
4 votes
3 answers
2k views

How do I load a Jenkins Shared Library in a Jenkins Job DSL seed?

I have a seed job using the plugin Jenkins Job DSL. I also have a shared library. I have tried using the @Library annotation to load the script and the library method. It cannot find the annotation ...
user avatar
  • 1,193
2 votes
2 answers
1k views

Jenkinsfile equivalent in Azure repos

We have our source code in GitHub. We use Jenkins for CI. We had written a Jenkinsfile in the Github repos and used GitHub plugin for Jenkins. The plugin would scan the repos and then Jenkins would ...
user avatar
  • 181
1 vote
3 answers
2k views

Jenkins upgrading and plugins ordering

I have Jenkins 2.89 installed with many outdated plugins as well. What is the best path for upgrading both the plugins and Jenkins itself? Should one proceed the other? I am leaning toward upgrading ...
user avatar
7 votes
2 answers
4k views

Jenkins job using VPN?

Is there a way to connect to a VPN for the duration of a Jenkins job? (freestyle or pipeline, I can work with either). I scoured the plugin list figuring someone might have developed something, but ...
user avatar
  • 4,152
5 votes
1 answer
917 views

Why does the jenkins-cli.jar linting functionality not work?

The jenkins-cli.jar has been downloaded. It is able to run. When one tries to check the syntax of a jenkinsfile by running java -jar ~/Desktop/jenkins-cli.jar -s https://<jenkins_url> -...
user avatar
  • 12.6k
4 votes
1 answer
123 views

What OS should a master node CI virtual machine be?

Say you are developing a new CI/CD system, deploy builds across Linux, Windows and Mac, and have now reached the point of wanting to deploy a master node which hosts your chosen CI tool. How do you ...
user avatar
  • 933
3 votes
1 answer
687 views

Why has Hudson been renamed to Jenkins? [closed]

There are two similar CI: Hudson and Jenkins. The Jenkins project was forked from Hudson after a dispute with Oracle. Why was it renamed back to Jenkins and what was the dispute about?
user avatar
  • 7,121
2 votes
1 answer
694 views

How can I retrieve the execution status of parallel triggered child jobs to a pipeline script

I have a pipeline script that executes child jobs in parallel. Say I have 5 data (a,b,c,d,e) that has to be executed on 3 jobs (J1, J2, J3) My pipeline script is in the below format for (int i = 0; ...
user avatar
1 vote
1 answer
133 views

Modularizing CI/CD pipelines in Jenkins or in other tools?

I have the following case: There are a couple of repositories (well, two-digit number). Each of them has some sort of (declarative) Jenkins pipeline - it would be one of three types: run tests -> ...
user avatar
  • 123
1 vote
1 answer
99 views

Secure Jenkins X on kubernetes

I have installed Jenkins X on kubernetes. I want to change the default installation and secure the Jenkins url, so that it will be not accessible to the public. Can I change it to some port, or some ...
user avatar
  • 171
0 votes
1 answer
292 views

how to create dynamic stages in jenkins pipeline

I want to use a python script as input to create stages in jenkins pipeline test.py {'job-name': 'Test1', 'action': 'a', 'targetname': 'x'} {'job-name': 'Test2', 'action': 'b', 'targetname': 'y'} {'...
user avatar
0 votes
1 answer
627 views

Why is parameter not propagated to post-build parameterized build?

I'm trying to apply the guidance I recently read at how to trigger parameterized builds from a different build in Jenkins and https://plugins.jenkins.io/parameterized-trigger/ - but this doesn't seem ...
user avatar