A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

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
62
votes
4answers
99k views

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 ...
59
votes
8answers
85k 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?
38
votes
4answers
38k 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 ...
27
votes
4answers
6k views

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 ...
20
votes
7answers
37k 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 ...
20
votes
4answers
20k 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? ...
18
votes
3answers
15k views

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 ...
18
votes
3answers
357 views

What are the advantages of using Jenkins over Hudson?

Jenkins is a fork of Hudson. What are the benefits/advantages of using Jenkins over Hudson for a small private business?
18
votes
2answers
12k views

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? ...
17
votes
3answers
4k views

Which SCM tools does Jenkins support?

I'm aware that Jenkins supports Git and SVN. What other SCM tools does Jenkins support?
17
votes
2answers
20k 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 ...
15
votes
3answers
2k views

How to check AWS spot pricing automatically?

I've been thinking about a Jenkins job to check the pricing for the agent boxes we spin up; every so often the price spikes and it'll be an hour or two before anyone notices that no new agents are ...
14
votes
3answers
720 views

How do you test changes to Jenkins plugins before deploying them?

If you ever been bitten by a plugin upgrade that broke some functionality you must have given some thought about this problem: What should be the Jenkins plugins upgrade policy? How do you test ...
13
votes
1answer
17k views

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(...
13
votes
2answers
11k views

How to check Jenkins build executor free memory?

In Jenkins when clicking on Build Executor Status I can only see free disk space related statistics (URI: /computer). How I can monitor free system memory (RAM) in Jenkins? I'm asking, because ...
13
votes
2answers
288 views

Continuous Integration infrastructure for multiple iOS projects

As a iOS developer, I was looking to create a CI and CCQ (= Continuous Code Quality) infrastructure for the iOS projects we have in development so far. We already use Jenkins and SonarQube for almost ...
13
votes
3answers
5k 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 ...
13
votes
3answers
8k views

Using Artifactory plugin in Jenkins declarative pipeline

I am using Jenkins Declarative Pipeline to automate my build process. We want to publish our artifacts to a remote JFrog repository only if certain conditions (Sonar,Checkmarx) pass. After a bit of ...
13
votes
4answers
2k views

Which plugin should I use to get started with Jenkins to manage mainframe components in PDS format?

Assume somebody familiar with DevOps and mainframes, but new to Jenkins, wants to get started with Jenkins, e.g. to: investigate the feasibility of managing data stored in personal files (PDSes, i.e. ...
13
votes
2answers
13k views

How to enable the npm cache in a Jenkins build slave that runs in docker?

I have a Docker image, let's call it frontend.image, that I use for a Jenkins build slave. The Jenkins Docker plugin will spin up a container from this image and build artifacts inside the container. ...
12
votes
1answer
917 views

Pass string to Jenkins job from Slack

In an ideal world our less tech-knowledgeable employees could just use a Slack command to run a job and get the results slacked back to them, negating the use of the Jenkins GUI. I found Start a build ...
11
votes
3answers
10k views

Jenkins: Permission issue using Docker as build environment

I installed Jenkins on an Ubuntu 16.04 machine. The Jenkins itself is not run in a container. What I want to do is simply call yarn install using a node image. So here is my Jenkinsfile: pipeline { ...
11
votes
2answers
5k views

What are the correct permission settings when running Docker in a Jenkins Pipeline?

I'm trying to get a new jenkins pipeline together to test new pull requests to our code. I'm using docker with the ubuntu:14.04 image to simulate our production environment. Here is a minimum working ...
11
votes
2answers
3k views

Is it bad to use sudo from Jenkins?

I use Publish Over SSH plugin to deploy my apps from Jenkins to different environments. Some deployment jobs do environment preps and things like stop and restart the app server system service. Some ...
11
votes
2answers
10k views

Get all change logs of since last successful build in Jenkins Pipeline

In my Jenkins pipeline, I can get change logs of the current build by this. def changeLogSets = currentBuild.changeSets Is there a way to get all change-logs since last successful build?
11
votes
3answers
13k views

Jenkins vs Azure DevOps Pipelines

I've been doing some research on the Azure DevOps solution that Microsoft recently unveiled. Some background, I've been using Jenkins for years, and recently started exploring the containerisation ...
11
votes
1answer
2k views

Is there a way to disable a Jenkins plugin for a single job?

I use the Build timeout plugin to alert when jobs are stuck. I have one job that triggers this alert because it contains a step with a long execution time. I would like to disable the build timeout ...
11
votes
1answer
4k views

How to include a custom Slack message only on completion?

We're running Jenkins with the Slack Notification Plugin. Is there a way to send the custom message only on completion, not on start? To be clear, I don't want to disable the build started message, I'...
11
votes
1answer
6k views

Jenkins Pipeline job; proper quoting for slackSend step

This is probably 100% user error, but I can't get a pipeline job to use a variable as the channel name in a slackSend step. This uses both the Slack plugin and the Build User Vars Plugin. I'm trying ...
11
votes
1answer
325 views

How to upgrade job-dsl files to Jenkins 2 pipelines?

Is there a common practice for migrating a large repository of Jenkins job-dsl to Jenkins2 pipelines? I am looking for ways to test the behaviour of builds, that go a little further than comparison of ...
11
votes
1answer
593 views

Is Elastic Beanstalk suitable for enterprise-grade CD?

I'm working with a project that's using Jenkins to build and deploy microservices to Elastic Beanstalk. We deploy an integration branch to a test environment, release branches to a staging environment,...
10
votes
3answers
1k views

What are the main differences between Jenkins and TeamCity if one is used to working with Jenkins?

These tools seem to share very similar characteristics. How complicated would it be to start using TeamCity after getting used to working on Jenkins? Are there specific concepts one needs to be ...
10
votes
4answers
2k views

How to structure DevOps related code and configs in a code repository?

We've been growing as a company, our products are expanding and our DevOps related activities and efforts are growing as well - we've switched from Bamboo to a more flexible and configurable Jenkins, ...
10
votes
1answer
1k 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. ...
10
votes
2answers
4k views

Git & Jenkins: get latest green commit on branch

We're just starting to push for CI-CD and as a baby step we're going to try updating a stack with the latest green develop once every couple of hours. I am fairly new to Git/Bitbucket, and can't ...
9
votes
2answers
270 views

What CIs could build libraries written in C++/VBA and .NET (C#) projects?

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 ...
9
votes
2answers
1k views

How to publish Jenkins job icons externally?

I'm using Promoted Builds Plugin to assign certain icons to Jenkins jobs on certain conditions and I'd like to publish these promotion icons. How can I generate external links to these icons per each ...
9
votes
3answers
9k views

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 ...
9
votes
2answers
9k views

How to rebuild multiple jobs at the same time in Jenkins?

I'm using Jenkins Rebuild Plugin to execute a parametrized builds with a single Rebuild button. However when I need to rerun dozens of parametrized jobs (either selected, or from the same folder), it'...
9
votes
2answers
8k views

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 ...
9
votes
1answer
4k views

How do I trigger scripts on a merge or when a branch is deleted?

I am using jenkins multibranch pipelines. If a branch is merged and deleted jenkins removes the branch from the pipeline as well. This is great, but I want to run a command/script when a branch is ...
8
votes
2answers
2k views

Is it ok to have a Jenkins Server without slave node?

In my team we have one Jenkins server with one master node & one slave node in the same server. We use Jenkins Pipelines and surround everything with node{}. In a colleague's team I have seen ...
8
votes
2answers
10k views

Bitbucket Pull Request Builder Configuration Jenkins

I need to integrate BitBucket with Jenkins. So that whenever a PR is opened in BitBucket it will trigger a build in Jenkins. Can some one help with exact configuration step that should I follow in ...
8
votes
3answers
953 views

How to remotely update AMI id in Jenkins EC2 plugin?

I have been looking for a way to update AMI id in Jenkins EC2 plugin configuration after a packer build is run. After some digging, I found a promising way to do it IF the packer run is done by ...
8
votes
2answers
8k 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 ...
8
votes
1answer
480 views

Jenkins Artifactory plugin not downloading in multi-thread

In my company we're having a bad time trying to download with the Artifactory plugin in Jenkins because we have a lot of tiny files in our repository and apparently the plugin works in a single thread,...
8
votes
1answer
876 views

Use Vault SSH OTP backend with Jenkins

I'm setting up Vault to store secrets. SSH backend with OTP auth looks like a good way to stop managing SSH keys for access. I have SSH backend working, and am looking at hooking up Jenkins with the ...
8
votes
1answer
227 views

Force Jenkins to reschedule parallel pipeline step as soon as node goes offline

Exactly this. In our environment, we're using GCE preemptible nodes and the Jenkins GCE plugin. As a consequence of this, it's highly likely (even expected) that a node will go away during the course ...
7
votes
1answer
15k views

How to store Jenkins job results and produce a summary report?

I'd like to store custom job result data into some format (e.g. in XML) that Jenkins can read and produce the summary report on the job page (ideally in the form of table). I'd like to know how this ...
7
votes
1answer
16k views

sshagent and jenkinsfile

I am new to Jenkinsfile. I have previously configured my Jenkins job from GUI, and we are now upgrading our server to use Jenkinsfile. My job contains a section which needs to SSH to another server. ...