Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Continuous Integration with Jenkins

You're reading from   Learning Continuous Integration with Jenkins A beginner's guide to implementing Continuous Integration and Continuous Delivery using Jenkins 2

Arrow left icon
Product type Paperback
Published in Dec 2017
Publisher Packt
ISBN-13 9781788479356
Length 362 pages
Edition 2nd Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
 Pathania Pathania
Author Profile Icon Pathania
Pathania
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Concepts of Continuous Integration FREE CHAPTER 2. Installing Jenkins 3. The New Jenkins 4. Configuring Jenkins 5. Distributed Builds 6. Installing SonarQube and Artifactory 7. Continuous Integration Using Jenkins 8. Continuous Delivery Using Jenkins 9. Continuous Deployment Using Jenkins 10. Supporting Tools and Installation Guide Index

Declarative Pipeline syntax


In the previous section, we created a Jenkins pipeline to get a look at and feel for its various components. We utilized the pipeline script that followed a declarative syntax to define our pipeline.

The Declarative Pipeline syntax is a more simplified and structured version of the Groovy syntax, the latter being more powerful due to its programmability. In this section, we will learn about the Declarative Pipeline syntax in a bit more detail. This is important because in the upcoming chapters we will be using the same to define our CI and CD pipelines.

Basic structure of a Declarative Pipeline

In simple terms, a Declarative Pipeline is a collection of multiple node blocks (nodes), stage blocks (stages), directives, and steps. A single node block can have multiple stage blocks, and vice versa. We can also run multiple stages in parallel. Let's see each of them in detail.

The node block

A node block defines the Jenkins agent wherein its constituents (stage blocks, directives...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images