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,050 points
556 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
• 46,080 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
• 46,080 points
59 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
• 46,080 points
136 views
+1 vote
2 answers

What possible return values are there in Jenkins plugin “Sonarqube scanner”

Use Webhooks in SonarQube Administration setup to ...READ MORE

answered Aug 3, 2018 in Jenkins by Nilesh
• 6,920 points
2,030 views
0 votes
1 answer

unable to compile java code in Jenkins

If the code is compiling and running ...READ MORE

answered Apr 25, 2018 in Jenkins by DareDev
• 6,850 points
397 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,400 points
311 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
• 46,080 points
1,459 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
• 46,080 points
874 views