What is the use of using declarative pipeline i e jenkins file over scripted pipeline in real time

0 votes
Please provide major use cases between the mentioned two pipelines.
Oct 28, 2020 in Jenkins by Shashi
• 360 points
217 views

1 answer to this question.

0 votes

Hi@Shashi,

The declarative pipeline is a relatively new feature that supports the pipeline as a code concept. It makes the pipeline code easier to read and write. This code is written in a Jenkinsfile which can be checked into a source control management system such as Git. Whereas, the scripted pipeline is a traditional way of writing the code.

You can also go through the below link.

https://www.edureka.co/community/54705/difference-between-declarative-pipeline-scripted-pipeliine

answered Oct 28, 2020 by MD
• 95,140 points
Interviewer is not satisfied with above answer. Cross question as below

Can we call the scripted pipeline through jenkins keeping it outside of jenkins using any functions, is it possible ?

Hi@Shashi,

I guess you can do that. You can create your scripted pipeline Job and then you can call or trigger the scripted pipeline using any function. This is how we create one pipeline Job using Groovy language.

Related Questions In Jenkins

0 votes
2 answers
0 votes
2 answers
0 votes
1 answer

Can I use multiple containers on a jenkins declarative pipeline?

Yes of course you can!! You try ...READ MORE

answered Apr 12, 2019 in Jenkins by Vedant
2,925 views
0 votes
2 answers

What is the command to restart jenkins through command line in linux?

On Ubuntu or Debian, when installed through apt-get/dpkg: $ ...READ MORE

answered Aug 1, 2019 in Jenkins by Sirajul
• 59,030 points
11,522 views
0 votes
1 answer

What is "Pipeline as code" concept in jenkins?

Jenkins "Pipeline as code"  allows you to define ...READ MORE

answered Jun 4, 2019 in Jenkins by Sirajul
• 59,030 points
828 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

What is the use of audit trail plugin in Jenkins?

Hi@akhtar, Audit Trail Plugin keeps a log of ...READ MORE

answered Dec 6, 2020 in Jenkins by MD
• 95,140 points
147 views