Questions tagged [jenkins-2]

Jenkins is an extensible continuous integration server. Jenkins is open source and has packages for Linux, Mac OS X, Windows, FreeBSD and OpenBSD. This tag is for questions relating to Jenkins version 2.x. For non version-specific questions, please use the [jenkins] tag.

This tag is for questions relating to Jenkins version 2.x. For non version-specific questions, please use the tag.


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 7 (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 12 weeks.

With its 10th anniversary Jenkins 2.0 was released in April 2016 and has some enormous changes:

  • Pipeline support out of the box
  • Better UI experience with dynamic pages
  • More plugins are bundled to prevent the paradox of choice

With version 2.0 the weekly release plan was reintroduced.

123 questions
12
votes
3 answers

Error response from daemon: pull access denied for TestDockerImage

I am new to docker and Jenkins2. I am trying to pull docker image from private docker repository. pipeline { agent{ docker{ image "PrivateRepo/Test" args "--username testUser --password pass -v…
Hitesh Bhandari
  • 133
  • 1
  • 1
  • 7
12
votes
2 answers

Jenkins Bitbucket Branch Source Plugin how to build only master and PR?

I'm using Jenkins 2 with the Bitbucket Branch Source Plugin which scans and builds all the branches and PRs. My problem is that when I push code to a PR, the branch is built twice (one for the branch and one for the PR). I would like to build only…
Pith
  • 3,706
  • 3
  • 31
  • 44
11
votes
4 answers

How do I use the report plugin on (PMD, PHPCPD, checkstyle, Jdepend...) in a Jenkins pipeline?

I'm using Jenkins 2.x with a Jenkinsfile to run a pipeline. I have built a job using Jenkinsfile and I want to invoke the Analysis Collector Plugin so I can view the report. Here is my current Jenkinsfile: #!groovy node { stage 'Build ' echo…
Pandu Siregar
  • 161
  • 2
  • 2
  • 7
10
votes
2 answers

Get previous build result

I want to emulate the original Jenkins behaviour of doing stuff (like sending out notifications) when builds become unstable / fail or become successful again. For that I need to query the previous build status, which can be done like…
Thomas Keller
  • 5,933
  • 6
  • 48
  • 80
10
votes
3 answers

installing node on jenkins 2.0 using the pipeline plugin

I am running the following docker image jenkinsci/jenkins:2.0-rc-1 to try out jenkins 2.0, and the "pipeline" view. I can't seem to install node. Here's my pipeline script: node { //tool([name: 'node-5.10.1', type:…
royse41
  • 2,310
  • 4
  • 22
  • 29
8
votes
5 answers

How to use a FileParameterValue in a jenkins 2 pipeline

How can a file from the current project workspace be passed as a parameter to another project. e.g. something like: build job: 'otherproject', parameters: [[$class: 'FileParameterValue', name: 'output.tar.gz', value: ??? ]], wait: false
Tom Deseyn
  • 1,735
  • 3
  • 17
  • 29
8
votes
3 answers

Jenkins 2.0 - Create new job

We have upgraded to Jenkins 2.0 and after upgrade we were not able to create a new job and while clicking the New Item it directs to a blank page, Below are the error on the log captured at that time, Apr 28, 2016 6:07:09 PM…
Eliyas
  • 177
  • 1
  • 11
8
votes
3 answers

Manual post-build action missing in jenkins 2.0

This option was available when I was on jenkins 1.65. Today I moved to jenkins 2.0 with a fresh install on a new machine. I don't see this option. This option is necessary for our delivery pipeline view. So pipeline has 2 steps: When a new commit…
rajya vardhan
  • 1,121
  • 4
  • 16
  • 29
7
votes
2 answers

Jenkins kubernetes plugin not working

I am trying to setup Jenkins Dynamic slaves creation using jenkins-kubernetes plugin. My jenkins is running outside K8s Cluster. Link: https://github.com/jenkinsci/kubernetes-plugin My jenkins version is 2.60.2 and Kubernetes plugin version is…
7
votes
3 answers

Jenkins 2 NPM_TOKEN credential

I'm trying to run Jenkins 2 pipeline (Jenkinsfile) that will use npm publish to publish a package to local NPM repository. In order to do that I've try to use the following stage in Jenkinsfile: stage('TEST npm whoami') { …
Ido Ran
  • 10,584
  • 17
  • 80
  • 143
6
votes
2 answers

Is there an easy way to convert existing Jenkins freestyle job to New Jenkins 2.x pipeline view

I have tons of existing Freestyle Jenkins jobs in my old Jenkins Instance and now I would like to migrate them to New Jenkins 2.0 pipeline jobs using a Jenkins file. I am following this page to create a Jenkins file:…
Harsha
  • 61
  • 1
  • 3
6
votes
3 answers

Jenkins: how to trigger pipeline on git tag

We want to use Jenkins to generate releases/deployments on specific project milestones. Is it possible to trigger a Jenkins Pipeline (defined in a Jenkinsfile or Groovy script) when a tag is pushed to a Git repository? We host a private Gitlab…
6
votes
1 answer

Jenkins 2 Multibranch Pipelines - How can I limit the visibility/execution of branches using the Role Strategy Plugin?

I am using multibranch pipelines in projects with two branches: develop and master. This creates two subprojects, one for each branch: App_Pipeline |---master |---develop I have set up the Role Strategy plugin to control the authorization…
5
votes
3 answers

Jenkins declarative pipeline: find out triggering job

We have a Jenkins job that uses a declarative pipeline. This job can be triggered by different other builds. In the declarative pipeline how can I find out which build has triggered the pipeline?
5
votes
2 answers

should I use Jenkins heavyweight or flyweight executors for notifications?

I have few steps in my Jenkins pipeline that notify users, in my case using Slack integration. is it a good practice to write the notification code inside a node block to use a heavyweight executor or just leave it outside to make use of a flyweight…
yeforriak
  • 1,705
  • 2
  • 18
  • 26
1
2
3
8 9