Top "Jenkins-declarative-pipeline" questions

A plugin tool for Jenkins which presents a simplified and opinionated syntax on top of the Pipeline sub-systems.

How to create methods in Jenkins Declarative pipeline?

In Jenkins scripted pipeline we are able to create methods and can call them. Is it possible also in the …

jenkins groovy jenkins-pipeline jenkins-groovy jenkins-declarative-pipeline
In a declarative jenkins pipeline - can I set the agent label dynamically?

Is there a way to set the agent label dynamically and not as plain string? The job has 2 stages: First …

jenkins jenkins-declarative-pipeline
How to use ${currentBuild.result} to indicate "SUCCESS" not "null"

My Jenkins declarative pipeline has the following post action: mail to: '<snip>', subject: "Status of pipeline: ${…

jenkins jenkins-declarative-pipeline
Declarative Pipeline - Use of when condition, how to do nested conditions anyOf/allOf/not

I am stuck at how to properly use nested conditions as proposed in the Jenkins syntax. https://jenkins.io/doc/…

jenkins-pipeline jenkins-declarative-pipeline
How to get the Jenkins master IP/hostname inside a pipeline stage executing on a slave?

I have a Jenkins declarative pipeline in which I build in one stage and test in another, on different machines. …

jenkins jenkins-pipeline jenkins-declarative-pipeline
How to continue past a failing stage in Jenkins declarative pipeline syntax

I want to define multiple stages in Jenkins declarative pipeline syntax which can continue past any one of them failing. …

jenkins jenkins-pipeline jenkins-declarative-pipeline
How to select multiple JDK version in declarative pipeline Jenkins

I want to use different JDK versions for different stages in Jenkins declarative pipeline. In the first stage I am …

jenkins groovy jenkins-declarative-pipeline
Execute Jenkins Pipeline step only when building a tag

I have certain build logic, such as publication, that I would like to have Jenkins perform only when it is …

jenkins jenkins-pipeline multibranch-pipeline jenkins-declarative-pipeline
Jenkins declarative pipeline. Conditional statement in post block

Have a Jenkins pipeline. Need/want to send emails when build succeeds. Email about all branches to maillist-1 and filter …

if-statement jenkins jenkins-declarative-pipeline
How to test sh script return status with jenkins declarative pipeline new syntax

Using new jenkins declarative pipeline syntax, I'd like to test the return status of a sh script execution. Is it …

jenkins jenkins-declarative-pipeline