/dry-pipeline

Jenkins pipeline playgroun

Primary LanguageGroovy

DRYing the Pipeline

Playground to play with Jenkins Pipeline's shared library examples.

Jenkins server is preloaded with examples of shared library pipeline examples and configurations:

Setup

  1. docker pull wenn/dry-pipeline:2.1.1
  2. docker run -d -p 8080:8080 -p 50000:50000 wenn/dry-pipeline:2.1.1
  3. Log in at localost:8080 using admin with password as password

In the Jenkins

  • Configure global shared library. Manage Jenkins > Configure System > Global Pipeline Libraries.
  • Configure folder level shared library folder-level-library > example > configure > Pipeline Library.
  • Examples of using shared library.
  • Examples of using post actions with both scripted and declarative pipelines.

Project layout

Read more about Jenkins pipeline shared lib directory structure.

resource
pipe.groovy the scripted pipeline with all examples, aka, the Jenkinsfile
vars shared lib's global variables are defined here.
src shared lib's groovy source files are defined here.