Book Image

Jenkins Essentials - Second Edition

By : Mitesh Soni
Book Image

Jenkins Essentials - Second Edition

By: Mitesh Soni

Overview of this book

<p>In agile development practices, developers need to integrate their work frequently to fix bugs or to create a new feature or functionality. Jenkins is used specifically for Continuous Integration, helping to enforce the principles of agile development. This book focuses on the latest and stable release of Jenkins (2.5 and later), featuring the latest features, such as Pipeline as Code, the new setup experience, and the improved UI. With the all-new Pipeline as Code feature, you will be able to build simple or advanced pipelines easily and rapidly, hence improving your teams' productivity.</p> <p>This book begins by tackling the installation of the necessary software dependencies and libraries you'll need to perform Continuous Integration for a Java application. From there, you'll integrate code repositories, applications, and build tools for the implementation of Continuous Integration.</p> <p>Finally, you will also learn how to automate your deployment on cloud platforms such as AWS and Microsoft Azure, along with a few advanced testing techniques.</p>
Table of Contents (17 chapters)
Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Dedication
Preface

Overview of pipeline as a code


The Jenkins Pipeline feature supports Continuous Delivery pipelines and Continuous Deployment into Jenkins using Pipeline DSL. In Pipeline, we model all related tasks to decide the sequence of execution. We will perform the same tasks we performed with the Build Pipeline plugin.

Pipeline as a code - implementation

Blue Ocean is a new user interface for Jenkins. The idea behind introducing Blue Ocean is to make Jenkins and Continuous Delivery approachable to all team members. We will use Blue Ocean later in the chapter, but we will install it now:

  1. Verify the successful installation of the plugin in the Jenkins plugin section:

  1. Now we will create our first pipeline in Jenkins.
  2. Click on New Item. Enter an item name and select Pipeline.
  3. Click OK:
  1. This will open the configuration of a newly created pipeline job:
  1. Go to the Pipeline section:
  1. In the try samplePipeline dropdown, select GitHub + Maven. It will automatically generate the syntax for the sample code. Make sure that...