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).

Jenkins pipeline how to change to another folder

Currently i am using Jenkins pipeline script. For running one command, I need to access a folder outside its workspace …

jenkins groovy jenkins-pipeline
Environment variable in Jenkins Pipeline

Is there any environment variable available for getting the Jenkins Pipeline Title? I know we can use $JOB_NAME to …

jenkins jenkins-pipeline
Is it possible to capture the stdout from the sh DSL command in the pipeline

For example: var output=sh "echo foo"; echo "output=$output"; I will get: output=0 So, apparently I get the exit …

jenkins jenkins-workflow jenkins-pipeline
How to define and use function inside Jenkins Pipeline config?

I'm trying to create a task with a function inside: def doCopyMibArtefactsHere(projectName) { step ([ $class: 'CopyArtifact', projectName: $projectName, filter: '**/**.…

jenkins groovy jenkins-pipeline
Send an email on Jenkins pipeline failure

How can I add to a Jenkins pipeline an old-style post-build task which sends email when the build fails? I …

jenkins jenkins-pipeline jenkins-email-ext
get current date and time in groovy?

What is the code to get the current date and time in groovy? I've looked around and can't find an …

groovy workflow jenkins-pipeline groovyshell
How to add a timeout step to Jenkins Pipeline

When you are using a free style project you can set that after 20 minutes the build is aborted if not …

jenkins jenkins-pipeline
Jenkins pipeline: No such DSL method

With this code i got an error in Jenkins pipeline. I don`t get it why? Am I missing something? …

jenkins groovy jenkins-pipeline
How do I pass variables between stages in a declarative Jenkins pipeline?

How do I pass variables between stages in a declarative pipeline? In a scripted pipeline, I gather the procedure is …

jenkins jenkins-pipeline
How to implement Post-Build stage using Jenkins Pipeline plug-in?

After reading Jenkins tutorial explaining Pipeline plug-in, it seems that plug-in should make it possible to implement Post-Build steps. However …

jenkins jenkins-workflow jenkins-pipeline