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
• 5,840 points
672 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
• 54,190 points

Related Questions In Jenkins

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
• 54,190 points
112 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
• 54,190 points
554 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
550 views
0 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
• 54,190 points
5,120 views
0 votes
2 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
• 54,190 points
6,417 views