Top "Jenkins-pipeline" questions

Questions about the Jenkins “Pipeline” plugin suite (formerly “Workflow”). Not about pipelines in Jenkins in general (e.g. using downstream jobs).

How to list all `env` properties within jenkins pipeline job?

Given a jenkins 2.1 build pipeline, jenkins injects a env variable into the node{}. For example, BRANCH_NAME can be accessed …

jenkins groovy jenkins-pipeline
Conditional step/stage in Jenkins pipeline

How do you run a build step/stage only if building a specific branch? For example, run a deployment step …

jenkins groovy jenkins-pipeline
How to print a groovy variable?

I have the following code within a Jenkins pipeline: stage ('Question') { try { timeout(time: 1, unit: 'MINUTES') { userInput = input message: 'Choose …

variables jenkins groovy jenkins-pipeline
Running stages in parallel with Jenkins workflow / pipeline

Please note: the question is based on the old, now called "scripted" pipeline format. When using "declarative pipelines", parallel blocks …

jenkins jenkins-pipeline
Jenkins: Can comments be added to a Jenkinsfile?

Are comments possible in a Jenkinsfile? If so, what's the syntax? I am using the declarative pipeline syntax. I want …

jenkins groovy comments jenkins-pipeline
How can I test a change made to Jenkinsfile locally?

When writing jenkins pipelines it seems to be very inconvenient to commit each new change in order to see if …

jenkins jenkins-workflow jenkins-pipeline
Get git branch name in Jenkins Pipeline/Jenkinsfile

I've create a jenkins pipeline and it is pulling the pipeline script from scm. I set the branch specifier to …

git jenkins branch jenkins-pipeline
Check if a file exists in jenkins pipeline

I am trying to run a block if a directory exists in my jenkins workspace and the pipeline step "fileExists: …

jenkins jenkins-pipeline
How to set and reference a variable in a Jenkinsfile

I have a declarative pipeline script for my multibranch project in which I would like to read a text file …

jenkins groovy jenkins-plugins jenkins-pipeline multibranch-pipeline
How to pass boolean parameter value in pipeline to downstream jobs?

I'm using Jenkins v2.1 with the integrated delivery pipeline feature (https://jenkins.io/solutions/pipeline/) to orchestrate two existing builds (…

jenkins groovy jenkins-pipeline