Jenkins Recipes and Tips

1. Jenkins snippet generator

Use jenkins snippet generator by adding /pipeline-syntax/ to your jenkins pipeline. to allow you to generate jenkins pipeline code easily with inline doc. It also list the available variables.

jenkins snippet generator

2. Declarative pipeline allows you to restart a build from a given stage

restart from stage

3. Replay a pipeline

Replaying a pipeline allows you to update your jenkinsfile before replaying the pipeline, easier debugging !

replay a pipeline

4. VS code Jenkinsfile validation

Please follow this documentation enable jenkins pipeline linter in vscode

5. How to chain pipelines ?

Simply use the build directive followed by the name of the build to launch

build 'OtherBuild'

6. Viewing pipelines hierarchy

The downstream-buildview plugin allows to view the full chain of dependent builds.

Jenkins Downstream Build Pipeline Visualization