Pipeline Syntax
The Pipeline Syntax has two forms (https://jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline):
- Declarative Pipeline
- Scripted Pipeline
The difference between the two forms is that the Declarative Pipeline syntax is meant to be a simpler syntax than the Scripted Pipeline. The Scripted Pipeline syntax is a DSL, that follows the Groovy programming language semantics.
Pipeline Editor
In the cucumber-examples repository, we created a Jenkinsfile by using the Pipeline Editor. You can actually write the Jenkinsfile without using the Pipeline Editor, although I would recommend using it to debug a pipeline script as the editor has some nice features.
Jenkinsfile
Here we have the actual Pipeline Syntax that the pipeline editor created for us. It is using the Declarative Pipeline syntax and there are several items to discuss in this syntax:
pipeline { agent { docker { args '-v /Users/jean-marcelbelmont/jenkins_data' image 'node:10-alpine' } } stages { stage...