What is Pipeline as code concept in jenkins

0 votes
I am a beginner in Jenkins and recently came across this term "Pipeline as Code". What does this mean?
Jun 4, 2019 in Jenkins by Sam
• 6,260 points
1,771 views

1 answer to this question.

0 votes

Jenkins "Pipeline as code"  allows you to define and automate pipelined job processes with code. Code that can be stored and versioned in a repository which allows you to track changes over time and used by jenkins to run build jobs.

To use Pipeline as code, projects must contain a file named Jenkinsfile in the repository root, which contains a "Pipeline script" that specifies the steps to execute the job.

A Jenkinsfile can be written using two types of syntax - Declarative and Scripted.

Scripted pipeline is built upon groovy and is more suitable for jobs that have a considerable amount of complexity whereas Declarative Pipeline was created to offer a simpler and more opinionated syntax for authoring Jenkins Pipeline.

You could have a look at these references for more info on the concepts of pipeline as code and also syntaxes of writing a scripted or declarative pipeline:

https://jenkins.io/doc/book/pipeline-as-code/

https://jenkins.io/doc/book/pipeline/getting-started/

https://jenkins.io/doc/book/pipeline/syntax/

For a beginner's guide on creation of pipeline tutorial you could refer to this blog:

https://www.edureka.co/blog/jenkins-pipeline-tutorial-continuous-delivery

answered Jun 4, 2019 by Sirajul
• 59,230 points

Related Questions In Jenkins

0 votes
1 answer

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

Hi@Shashi, The declarative pipeline is a relatively new ...READ MORE

answered Oct 28, 2020 in Jenkins by MD
• 95,460 points
1,547 views
0 votes
1 answer

What is Blue Ocean in jenkins?

Blue Ocean is a project that redefines/rethinks ...READ MORE

answered Aug 26, 2019 in Jenkins by Sirajul
• 59,230 points
920 views
0 votes
1 answer

What is groovy in jenkins?

Groovy is the default scripting language that ...READ MORE

answered Aug 27, 2019 in Jenkins by Sirajul
• 59,230 points
5,101 views
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+2 votes
1 answer
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,708 views
+1 vote
3 answers

How to auto build a job in jenkins if there is any change in code on Github repository?

To automatically run build on code commit, follow ...READ MORE

answered Jul 31, 2019 in Jenkins by Sirajul
• 59,230 points
78,758 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