Day 23 Task: Jenkins Declarative Pipelines for Devops Engineers.
Jenkins Declarative Block Digram.

Day 23 Task: Jenkins Declarative Pipelines for Devops Engineers.

Team in the today's session(article), we will learn the Declarative Pipeline in Jenkins with Definitions help of tasks.

Some Common terms for your Knowledge:

A) Pipeline:- A Pipeline is a collection of steps or jobs interlinked in a Sequence.

B) Declarative:- It is a more recent and advanced implementation of a pipeline as a code.he

C) Scripted:- It wast the first and most traditional implementation of the pipeline as a code in Jenkins.

Why you should have a Pipeline:-

The Definition of a Jenkins is written into a text file. which will be written in the code.

Jenkins Pipeline Syntax:-

No alt text provided for this image
Jenkins Pipeline Syntax: Diagram.

Discuss with the help of a Task:

Task-01

  1. Create a New Item, this time select the pipeline option not a Freestyle Project.

A) Create a Declarative pipeline in Jenkins, go to jenkins UI and click on New item.

No alt text provided for this image
Jenkins Dashboard Diagram.

B) Enter the pipeline name & select Pipeline,and the click on ok.

No alt text provided for this image
Enter a name select pipeline Diagram.

C) After create the pipeline, Now go to project configuration page, In general give a description of your project (I will add This is a Jenkins Pipeline Hello world).

No alt text provided for this image
In General option give a Description of the Pipeline Diagram.

D) Noe to to the 3rd option Pipeline (Definition option) scroll down select the pipeline script.

No alt text provided for this image
3Rd option Pipeline and add a Pipeline script Diagram.

E) Write a Pipeline Script of "Hello world"

No alt text provided for this image
Now Write a Script of "Hello World" Diagram.

Before i will move for the Build the Pipeline, Let's discuss a small Description of every points which are used for the Script.

1) Pipeline:- Declarative pipeline should start with the pipeline and this is the mandatory block.

2) Agent:- It specifies the jenkins build job should run. we have used the agent as any.

3) Stages:- It consists of the different executable stage block.

Steps:-

Steps block consist of the actual operation which needs to be performed inside Jenkins. in the Diagram i will use the "Hello World"

F) Build the project, you can manually build the project by clicking on the "Build now". link in the project's main page dashboard.

No alt text provided for this image
Click on the Build now Diagram.

G) After a build a completed, you can view the console output by clicking on the "Console output" in the build page.

No alt text provided for this image
Console Output of the Declaritive Jenkins Pipeline Diagram.

H) Now your pipeline are Successfully and Printed the "hello World"

I) you can see the each stage view by Clicking on the "Full stage View" in the project main page.

No alt text provided for this image
stage view by Clicking on the "Full stage View Diagram.

Now in the today, I have Successfully run the Declarative Pipeline inJenkins.


Thank you for reading this Article !! Stay Connected!!

Happy Learning!!


Next Topic

Day 24 Task: Jenkins Agent for DevOps Engineers.





Hello Maninder... We post 100's of job opportunities for developers daily here. Candidates can talk to HRs directly. Feel free to share it with your network. Visit this link - https://jobs.hulkhire.com And start applying.. Will be happy to address your concerns, if any

Like
Reply

To view or add a comment, sign in

More articles by Maninder Singh

  • Artificial Intelligence for DevOps Engineer

    Dear learners, In today article we will explain the Artificial Intelligence for the DevOps Engineers. Important Aspects…

    12 Comments
  • Bash Shell Scripting:- Lesson 7,8 &9 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 Comments
  • Bash Shell Scripting:- Lesson 4,5 &6 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 Comments
  • Bash Shell Scripting:- Lesson 1,2 &3 for DevOps Engineers.

    Dear Learners, In Today Topic, We will learn the Shell Scripting form Basics to Advanced for DevOps Engineers. Course…

    3 Comments
  • EP 2 DevOps:- 2 Tier Application Deployment

    2-Tier Application Deployment Diagram (Architecture) Dear Learners in today topic we will deploy a 2 Tier Application…

    8 Comments
  • DevOps Engineers:- Docker Cheat Sheet

    Dear learner, presented below is a concise yet comprehensive Docker cheat sheet, complete with detailed commands and…

    7 Comments
  • DevOps (Day-90): Ending the challengs

    Table of Contents: Flashback Self-Impact of Learning Today, We have completed the 90days of DevOps challenge where we…

    16 Comments
  • DevOps (Day-88): Kubernetes Architecture

    Dear Learner's in today topic we will discuss the Kubernetes Architecture in detail. Table of Contents Kubernetes…

    1 Comment
  • DevOps (Day-87): Argo CD

    Dear Learners in today topic we will the discuss the Argo CD in Kubernetes. Table of Contents Challenges with CD into…

    13 Comments
  • DevOps (Day-86): Project-7 Portfolio App

    Dear Learners in Today's article we will deploying a Portfolio app on AWS S3 Bucket using GitHub. Table of Contents:…

    10 Comments

Others also viewed

Explore content categories