0 votes
in Maven - Coalescing Pipeline by
Explain the two types of pipeline in Jenkins, along with their syntax.

1 Answer

0 votes
by
edited by
A: Explain the two types of pipeline in Jenkins, along with their syntax.

Jenkins provides two ways of developing a pipeline code: Scripted and Declarative.

A. Scripted Pipeline: It is based on Groovy script as their Domain Specific Language. One or more node blocks do the core work throughout the entire pipeline.

Syntax:

Executes the pipeline or any of its stages on any available agent

Defines the build stage

Performs steps related to building stage

Defines the test stage

Performs steps related to the test stage

Defines the deploy stage

Performs steps related to the deploy stage

B. Declarative Pipeline: It provides a simple and friendly syntax to define a pipeline. Here, the pipeline block defines the work done throughout the pipeline.

Syntax:

Executes the pipeline or any of its stages on any available agent

Defines the build stage

Performs steps related to building stage

Defines the test stage

Performs steps related to the test stage

Defines the deploy stage

Performs steps related to the deploy stage

Related questions

+1 vote
asked Aug 6, 2020 in Maven - Coalescing Pipeline by Robindeniel
0 votes
asked Sep 23, 2020 in Artificial Intelligence by SakshiSharma
...