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

Conditional Build Step plugin


The Conditional Build Step plugin allows us to wrap any number of other build steps, controlling their execution based on a defined condition.

Install the plugin from the Jenkins dashboard:

This plugin defines a few core run conditions, such as:

  • Always/Never: To disable a build step from the job configuration
  • Boolean condition: To execute the step if a token expands to a representation of true
  • Current status: To execute the build step if the current build status is within the configured/specific range
  • File exists/Files match: To execute the step if a file exists or matches a pattern
  • Strings match: To execute if the two strings are the same
  • Numerical comparison: To execute the build step depending on the result of comparing two numbers
  • Regular expression match: To execute the build step depending on the matching of regular expression
  • Provide a regular expression and a label: To execute the build step if the expression matches the label
  • Time/Day of week:To execute the build...