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
• 370 points
1,547 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,460 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
5,957 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,230 points
20,709 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,230 points
1,772 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 7, 2020 in Jenkins by MD
• 95,460 points
1,323 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP