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
0
votes
1 answer

Groovy parameters are not visible in shell part of a Jenkinsfile

I'm facing a problem in Groovy script wherein the variable is not accessible in shell script part. script-1: def a=20; println ("a is: $a"); output-1: a is: 20 script-2: def a=20; println ("a is: $a"); sh '''echo a is…
Yash
  • 2,944
  • 7
  • 25
  • 43
0
votes
1 answer

Groovy: regex to filter out "Key:Value" pair and store in an array

I am writing a GROOVY script for a Jenkinsfile to do following: Step-1: read the input file info_file.txt. Contents of info file are as under: sh> cat info_file.txt CHIP_DETAILS:1234-A0;1456-B1;2456-B0;3436-D0;4467-C0 Step-2: Store the CHIP_DETAILS…
Yash
  • 2,944
  • 7
  • 25
  • 43
0
votes
1 answer

How can we run two stages in parallel in Jenkins2.0 Pipeline project

How can we run two stages in parallel in Jenkins2.0 Pipeline project. For ex: in the following code i want to run the two stages to run in parallel i.e. "Build_First_Repo" and "Build_Second_Repo" should run in parallel. stage "Build_First_Repo" …
0
votes
0 answers

How to track changes in Jenkins build environment?

I am looking for a solution that would allow me to record and diff the following things in Jenkins: installed system packages (like rpms) installed pip packages (pip freeze/list) - could be multiple: system or one or more virtual environments. API…
sorin
  • 161,544
  • 178
  • 535
  • 806
0
votes
2 answers

Jenkins PackageCloud upload - Missing artifact - fingerprint - No such file or directory

Using: Jenkins: 2.7.2 PackageCloud Plugin: 1.11 Created a new trial account in packagecloud.io site, created a new private repository (URL just fyr: https://packagecloud.io/arunsangal/deb_stuff). As per the docs, I created a new Jenkins credential…
AKS
  • 16,482
  • 43
  • 166
  • 258
0
votes
1 answer

Jenkins parallel criteria

I have a parallel declaration like so: parallel(first: { step(...) }, second: { step(...) }) Which works fine. Now, if I extend that by a function call: def myFunc(num): sh """\ mkdir -p ${num} """ node('myspecialslave') { …
abergmeier
  • 13,224
  • 13
  • 64
  • 120
0
votes
1 answer

How do i add build parameters of a job in Jenkins 1 remotely to another job in Jenkins 2?

I have two Jenkins environment both in different machines and both are different jobs. A job in Jenkins 1 triggers a remote job in Jenkins 2 using Parameterized Remote Trigger plugin. Is there a way in which i can add the build parameters from the…
NCoder
  • 5
  • 1
  • 6
0
votes
1 answer

Jenkins2 Pipeline detect SCM changes

I have a pipeline that runs a bunch of jobs. In this case for the subversion trunk. It lets me select the option to poll SVN with a cron-job, but not which repo location to poll. How can I specify that? Do I need to specify it? Would I rather start…
michaelbahr
  • 4,837
  • 2
  • 39
  • 75
0
votes
2 answers

jenkins 2.7 pipeline build in docker container

I am trying to build my project with Jenkins and pipeline plugin in docker container. My Jenkinsfile looks like this: node('docker') { docker.image('build-node:1').inside { stage 'scm checkout' checkout scm stage 'maven…
burtsevyg
  • 3,851
  • 2
  • 29
  • 44
0
votes
2 answers

Test Jenkins 2.0 Pipeline but does nothing

I try to execute the example of Jenkins for a new Pipeline. When I launch it, the build is running but when I display the console, there is nothing in it except Started by user anonymous I let the pipeline run for a few minutes and then I force to…
bryce
  • 842
  • 11
  • 35
0
votes
1 answer

Why don't my migrated Jenkins jobs display after migration from Windows to Linux?

I recently migrated our windows instance of Jenkins to Linux. This was very easy as I just copied everything from %JENKINS_HOME% to the linux box. However someone let me know they had their own personal instance of Jenkins that they wanted to…
Cole Mietzner
  • 303
  • 1
  • 5
  • 13
0
votes
1 answer

How to create pipeline script?

I have a pipeline job created in Jenkins and I need to create a pipeline script that displays the failure and unstable builds in developement stage. What are the steps to create this in Jenkins 2.0 or Is there any sample pipeline script
Eliyas
  • 177
  • 1
  • 11
0
votes
0 answers

Jenkins 2.0 pipeline "guard/rescue" equivalent

We are currently using the build flow plugin to coordinate some integration tests using code along these lines : guard { parallel( { build('integration-test-mysql') }, { build('integration-test-pgsql') }, {…
Friedrich 'Fred' Clausen
  • 3,321
  • 8
  • 39
  • 70
0
votes
1 answer

“Inject environment variables” Jenkins 2.0

I recently upgraded to Jenkins 2.0. I’m trying to add a build step to a jenkins job of "Inject environment variables" along the lines of this SO post, but it’s not showing up as an option. Is this not feature in Jenkins 2.0 (or has it always been a…
MrColes
  • 2,453
  • 1
  • 28
  • 38
0
votes
1 answer

Jenkins Plugin - Enable Stage View Plugin

How to enable Pipeline stage view Plugin in Jenkins 2.0. There is no option available to enable the plugin
Eliyas
  • 177
  • 1
  • 11
1 2 3
8
9