Skip to content

RENDEZVOUS

Explore-Share-Contribute

  • AI
  • Agile
  • Atlassian
  • Automation
  • CloudOps
  • DevOps
  • IAC
  • VSM
  • Toggle search form

Create Jenkins Pipeline – Chapter 4

Posted on October 21, 2019August 9, 2022 By Ranjana Jindal

The last chapter – Chapter 3 introduced the concept of Jenkins Pipeline and the steps to install Pipeline plugin in Jenkins. In this chapter, we will look into steps to create a simple pipeline project in Jenkins.

Step 1 -> Log into Jenkins and click on the ‘New Item’ option to create a pipeline project. Enter details as shown in snapshot below…

Step 2 -> When you click on ‘Pipeline’ you get 2 options – ‘Pipeline script’ (for scripted pipelines) and ‘Pipeline script from SCM’ (for declarative pipeline). Select the option you would like to implement, in our example – we will select ‘Pipeline script’ option.

Step 3 -> Start writing the code – a sample shown below. Post that, save it.

Step 4 -> Now to build the script, click on ‘Build Now’ option on left panel. The build gets triggered and displays below result-

To view result, click on build number ‘#1’, and then click on ‘Console Output’.

You will be able to view the text that you had scripted. Lets spend some time to understand the key segments in the pipeline-

a. Everything is wrapped in a ‘pipeline’

b. Inside a pipeline, we have ‘agent’ – in this example, we said that the activity will run on Jenkins Master

c. On the mentioned ‘agent’, the stages and related steps are mentioned.

We did talk about these elements in our last chapter, lets try to map it with our sample code-

This is just an example to test the pipeline and see how it works. In the next Chapter, we will focus on various options available to leverage pipeline feature as well as share some examples.

Happy Learning!!

Click here for Chapter 5 – Calling multiple jobs in Jenkins.

Technical Documentation Tags:#create pipeline in jenkins;, #declarative jenkins pipeline;, #jenkins pipelie;, #ramz, #rendezvous;

Post navigation

Previous Post: About Jenkins Pipeline – Chapter 3
Next Post: “So Kyon Manda Akhiye??”- So Why Call Her Bad??

Related Posts

Installing Jira – Chapter 2 Technical Documentation
How to use Google Cloud SDK in Powershell? Technical Documentation
Understanding uDeploy Workflows Technical Documentation
Jira Query Language(JQL) – Chapter 7 Technical Documentation
DevOps Journey... DevOps Transformation Technical Documentation
DevOps … whats your definition? Technical Documentation

Copyright © 2025 RENDEZVOUS.

Powered by PressBook Grid Dark theme