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

Introduction of Jenkins 2


Let's first understand what CI is. CI is one of the most popular application development practices in recent times. Developers integrate bug fixes, new feature development, or innovative functionality in a code repository. The CI tool verifies the integration process with an automated build and test to detect issues with current sources of an application and provide quick feedback:

Jenkins is a simple, extensible, and user friendly open source tool that provides continuous integration services for application development. Jenkins supports SCM tools such as Git, Subversion, Star Team, and CVS, AccuRev. Jenkins can build Apache Ant and Apache Maven-based projects.

The concept of plugins makes Jenkins more attractive, easy to learn, and easy to use. There are various categories of plugins available, such as the following:

  • Source code management
  • Slave launchers and controllers
  • Build triggers
  • Build tools
  • Build notifiers
  • Build reports
  • Other post-build actions
  • External site/tool integrations
  • UI plugins
  • Authentication and user management
  • Android development
  • iOS development
  • .NET development
  • Ruby development
  • Library plugins

Jenkins defines interfaces or abstract classes that model a facet of a build system. Interfaces or abstract classes agree on what needs to be implemented, and Jenkins uses plugins to extend those implementations.

With Jenkins 2, the focus is also on CD where the application is deployed in the specific environment using an automated approach. Jenkins 2 is a clear signal regarding the focus on both CI and CD best practices of DevOps culture and not on CI only.

Features

Jenkins is one of the most popular automation servers in the market, and the reasons for its popularity are some of the following features:

  • Easy installation on different operating systems, Arch Linux, FreeBSD, Gentoo, MacOS X, openBSD, openSUSE, RedHAT/Fedora/CentOS, Ubuntu/Debian, Windows, and it is also available for Docker and as generic Java packages too.
  • Easy upgrades: Jenkins has very speedy release cycles (long-term support and weekly releases).
  • Simple and easy to use user interface in Jenkins 2.x -.
  • Set of suggested plugins at the time of installation.
  • Improved new item page.
  • Improved job configuration page with easy navigation.
  • Jenkins 2 supports pipelines as code that uses domain-specific language (DSL) to model application delivery pipelines as code; we can utilize the pipelines as code and keep them in a repository and maintain versions in a similar way to source code.
  • Easily extensible with the use of third-party plugins: there are over 400 plugins.
  • Easy to configure the setup environment in the user interface. It is also possible to customize user interface as you wish.
  • Master slave architecture supports distributed builds to reduce the load on CI servers.
  • Build scheduling based on cron expressions.
  • Shell and Windows command execution that makes any command-line tool integration in the pipeline very easy.
  • Notification support related to build status.