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

Can I check if Environment variable exist or not in Jenkinsfile

I am running Multibranch pipeline for my project. The behaviour of Jenkinsfile should change according to the trigger. There are …

jenkins groovy jenkins-pipeline multibranch-pipeline
Configuring Groovy SDK within IntelliJ IDEA

I am running IntelliJ IDEA 2017.2.3. I installed Groovy 2.4.12 via Homebrew (OS X). When I open a Groovy source file (or …

intellij-idea groovy jenkins-pipeline
Limiting Jenkins pipeline to running only on specific nodes

I'm building jobs that will be using Jenkins piplines extensively. Our nodes are designated per project by their tags, but …

jenkins jenkins-pipeline
"Build Periodically" with a Multi-branch Pipeline in Jenkins

I'm running Jenkins 2 with the Pipeline plugin. I have setup a Multi-branch Pipeline project where each branch (master, develop, etc.) …

jenkins jenkins-pipeline
How do I implement a retry option for failed stages in Jenkins pipelines?

I have a Jenkinsfile with multiple stages and one of them is in fact another job (the deploy one) which …

groovy jenkins-workflow jenkins-pipeline jenkinsfile
Can I create dynamically stages in a Jenkins pipeline?

I need to launch a dynamic set of tests in a declarative pipeline. For better visualization purposes, I'd like to …

jenkins jenkins-pipeline
How to throw exception in jenkins pipeline?

I have handled the Jenkins pipeline steps with try catch blocks. I want to throw an exception manually for some …

jenkins jenkins-plugins jenkins-pipeline
How to set PATH in Jenkins Declarative Pipeline

In Jenkins scripted pipeline you can set PATH env variable like this : node { git url: 'https://github.com/jglick/simple-maven-project-with-tests.…

jenkins path environment-variables jenkins-pipeline
Use Jenkins 'Mailer' inside pipeline workflow

I'd like to leverage the existing Mailer plugin from Jenkins within a Jenkinsfile that defines a pipeline build job. Given …

jenkins jenkins-plugins jenkins-pipeline
Can I define multiple agent labels in a declarative Jenkins Pipeline?

I'm using declarative Jenkins pipelines to run some of my build pipelines and was wondering if it is possible to …

jenkins groovy jenkins-pipeline