# #Day26 Jenkins Declarative Pipeline

Hello , Everyone, This is my 26 blog started my day26 as AWS DevOps Engineer #90daysofchallenge with ShubhamLondhe #devops #trainwithshubham

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1708323215101/d73cd436-cd86-4471-9bcd-0e852278da11.png align="center")

**What is Pipeline**

Ans:- In Jenkins, a pipeline is a set of instructions that define the entire software development process from code building to testing, packaging, and deployment, executed by Jenkins using the Jenkins Pipeline plugin. It is divided into stages and offers benefits like continuous integration, repeatability, and traceability.

### **Declarative Pipeline**

\-&gt;Declarative Pipeline is a feature in Jenkins that provides a simplified and opinionated syntax for defining pipelines. It uses a structured and declarative syntax, making it easier to define, visualize, and manage complex pipelines. It provides a consistent and streamlined way of defining pipelines and supports several integrations and plugins.

### **Scripted pipeline**

* Scripted Pipeline is a feature in Jenkins that allows developers to define pipelines using a scripted syntax. It provides a high degree of flexibility, allowing developers to create complex pipelines using a range of programming constructs. It is particularly useful for advanced use cases that require complex logic and functionality.
    

### **Why you should have a Pipeline?**

* Having a pipeline is essential in modern software development practices as it helps to streamline the entire software development process from building to deployment. By using a pipeline, developers can automate each step in the software delivery process, ensuring that every change in the codebase is tested, reviewed, and deployed in a consistent and repeatable way.
    
* Other benefits of using a pipeline include improved team collaboration, better code quality, and more efficient project management. It also helps to ensure traceability, making it easier to track down issues and bugs and to provide a detailed record of every step in the software development process.
    

### **Pipeline syntax**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1708323512568/4eb7e8e5-6986-41c1-8442-072b0fb0d7e9.png align="center")

# Task-01

* Create a New Job, this time select Pipeline instead of Freestyle Project.
    
* Follow the Official Jenkins [Hello world example](https://www.jenkins.io/doc/pipeline/tour/hello-world/)
    
* Complete the example using the Declarative pipeline
    

Ans:- . open your Jenkins dashboard n click on “ new item ,, to create a new job.  
2\. give your job a name n select “ pipeline ,, as the type of project.  
3\. scroll down to the “ pipeline ,, section n select “ pipeline script ,, from the “ definition ,, dropdown.  
4\. in the script area u will write the declarative pipeline code.  
5\. copy the following code , paste it into the script area .

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1708323959391/378c0cd7-76d2-4146-9846-fd645b240ccf.png align="center")
