Mastering Jenkins
eBook - ePub

Mastering Jenkins

Jonathan McAllister

Share book
  1. 334 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering Jenkins

Jonathan McAllister

Book details
Book preview
Table of contents
Citations

About This Book

Configure and extend Jenkins to architect, build, and automate efficient software delivery pipelines

About This Book

  • Configure and horizontally scale a Jenkins installation to support a development organization of any size
  • Implement Continuous Integration, Continuous Delivery, and Continuous Deployment solutions in Jenkins
  • A step-by-step guide to help you get the most out of the powerful automation orchestration platform that is Jenkins

Who This Book Is For

If you are a novice or intermediate-level Jenkins user who has used Jenkins before but are not familiar with architecting solutions and implementing it in your organization, then this is the book for you. A basic understanding of the core elements of Jenkins is required to make the best use of this book.

What You Will Learn

  • Create and manage various types of build jobs, and implement automation tasks to support a software project of any kind
  • Get to grips with the automated testing architecture, and scalable automated testing techniques
  • Facilitate the delivery of software across the SDLC by creating scalable automated deployment solutions
  • Manage scalable automation pipelines in Jenkins using the latest build, test, and deployment strategies
  • Implement a scalable master / slave build automation platform, which can support Windows, Mac OSX, and Linux software solutions
  • Cover troubleshooting and advanced configuration techniques for Jenkins slave nodes
  • Support a robust build and delivery system by implementing basic infrastructure as code solutions in configuration management tools such as Ansible

In Detail

With the software industry becoming more and more competitive, organizations are now integrating delivery automation and automated quality assurance practices into their business model. Jenkins represents a complete automation orchestration system, and can help converge once segregated groups into a cohesive product development and delivery team. By mastering the Jenkins platform and learning to architect and implement Continuous Integration, Continuous Delivery, and Continuous Deployment solutions, your organization can learn to outmanoeuvre and outpace the competition.

This book will equip you with the best practices to implement advanced continuous delivery and deployment systems in Jenkins. The book begins with giving you high-level architectural fundamentals surrounding Jenkins and Continuous Integration. You will cover the different installation scenarios for Jenkins, and see how to install it as a service, as well as the advanced XML configurations. Then, you will proceed to learn more about the architecture and implementation of the Jenkins Master/Save node system, followed by creating and managing Jenkins build jobs effectively. Furthermore, you'll explore Jenkins as an automation orchestration system, followed by implementing advanced automated testing techniques. The final chapters describe in depth the common integrations to Jenkins from third-party tools such as Jira, Artifactory, Amazon EC2, and getting the most out of the Jenkins REST-based API.

By the end of this book, you will have all the knowledge necessary to be the definitive resource for managing and implementing advanced Jenkins automation solutions for your organization.

Style and approach

This book is a step-by-step guide to architecting and implementing automated build solutions, automated testing practices, and automated delivery methodologies. The topics covered are based on industry-proven techniques, and are explained in a simple and easy to understand manner.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Mastering Jenkins an online PDF/ePUB?
Yes, you can access Mastering Jenkins by Jonathan McAllister in PDF and/or ePUB format, as well as other popular books in Informatik & Anwendungsentwicklung. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781784390891

Mastering Jenkins


Table of Contents

Mastering Jenkins
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
The Website
Questions
1. Setup and Configuration of Jenkins
The Jenkins platform architecture and configuration techniques
Jenkins on Microsoft Windows
Configuring the JVM and Java arguments–port, JRE, and memory
Jenkins on Linux and UNIX
Configuring the JVM
Running Jenkins behind an NGINX reverse proxy
Running Jenkins behind an Apache reverse proxy
Disaster recovery in Jenkins
Jenkins snapshot backups
Setting up a Jenkins mirror – rsync
Jenkins on Mac OS X
The Jenkins LTS release line
Jenkins XML configuration files
Summary
2. Distributed Builds – Master/Slave Mode
Understanding the master and slave architecture
Creating slave nodes in the UI
Choosing a launch method
Slave agent via Java Web Start
Prerequisites
The Jenkins Java Web Start launch page
JavaWS via a web browser
JavaWS via the command line
Headless slave agents via the command line
Slave agents on Windows via WMI and DCOM
Troubleshooting Windows DCOM and CIFS errors
Error – access denied
Workaround 1
Workaround 2
Error – no more data available
Workaround
Slave agents via SSH tunneling
Administering Jenkins slaves
The node administration dashboard
Preventative monitoring
Managing individual slave nodes
Labels, groups, and load balancing
Attaching a slave to a group by creating a label
Attaching a slave to many groups
Restricting slave execution to global or tied jobs
Jenkins plugins that support distributed builds
Summary
3. Creating Views and Jobs in Jenkins
The Jenkins user interface
The main header
The configuration panel
The job table
RSS feeds
The Jenkins build queue and executor status panel
Jobs in Jenkins
Freestyle projects in Jenkins
Project options
Defining build parameters
Advanced project options
Source code management
Source control via SVN
Advanced SVN options
Source control via Git–requires the Git plugin
Additional behaviors
Build triggers
Build steps
Post-build actions
Maven projects
Build triggers
Build step
Advanced options
Post-build steps
Monitoring external jobs
Multiconfiguration jobs in Jenkins – matrix jobs
Configuration matrix
Slaves
Label expression
User-defined axes
Creating views
Filtering jobs by regular expression
Summary
4. Managing Views and Jobs in Jenkins
Managing Views in Jenkins
Altering the default "View"
Customizing the basic content of a View
Advanced customization of a "Views" content
Navigating a job's project page
The Configuration panel
The Build History panel
The project overview – central panel
Job execution
The Job Execution Configuration panel
The Status panel
The Console Output
Summary
5. Advanced Automated Testing
Quality assurance initiatives and test automation terminology
The Software Development Lifecycle
Connecting product codes to tests
Baking quality into the product
Efficient automated test architecture
Automated testing in Jenkins
Unit tests in Jenkins through MSTest
How to set up MSTest agents
Running automated tests via MSTest
A example MSTest execution
Running MSTests and reporting the results in Jenkins
Publishing test results in Jenkins
Organizing test jobs
Distributed testing solutions
The Selenium Grid
Parallel down-stream jobs
Summary
6. Software Deployments and Delivery
Standardizing build outputs
Architecting a packaging scheme
Implementing a Definitive Media Library
Publishing assets to a DML
Jenkins' archive the artifacts post-build action
Publishing to Artifactory
Publishing via Maven
Pushing a Docker container
Automated deployments
Retrieving build artifacts and packages
Fetching artifacts via archive artifacts
Fetching artifacts from Artifactory
Fetching artifacts via Maven
Verifying package integrity
Jenkins fingerprints
MSBUILD via custom C# task
Linux / Unix BASH script
Executing deployment automation
Leveraging Jenkins slave nodes for deployment
Summary
7. Build Pipelines
The value proposition of build pipelines
Architecting a build pipeline
The first segment of the build pipeline
Additional pipeline segments
The complete pipeline
Visualizing the final pipeline
Alterations for shrink-wrapped and embedded projects
Implementing build pipelines in Jenkins
Upstream jobs – triggered
Downstream jobs – via post build actions
The Parameterized Trigger plugin
The Promoted build plugin
The Post-Build Tasks plugin
The Delivery Pipeline plugin
Connecting two Jenkins instances – development and production
Summary
8. Continuous Practices
Kaizen – Continuous Improvement
Kanban
Continuous Integration
What Continuous Integration is not
Code-based branching techniques
Branch by abstraction
Feature toggles
Fail fast and recover even faster
Distributed Version Control
Continuous Integration in Jenkins
SCM polling
Running a Jenkins job via the SVN post-commit hooks
Windows–VBScript
*Nix–Bash
Triggering a Jenkins job via GitHub push
Jenkins configurations
GitHub configurations:
Continuous Delivery
The principles of Continuous Delivery
Continuous Delivery in Jenkins
Rapid feedback loops
Quality gates and approvals
Build pipeline workflow and visualization
Continuous Deployment
Continuous Deployment in Jenkins
Summary
9. Integrating Jenkins with Other Technologies
Jenkins and Docker – Linux guide
Running Jenkins inside a Docker container – Linux
Dynamic Jenkins slave nodes using Docker
Pre-requisite requirements
Implementation tutorial
Integrating Jenkins with Ansible – Linux and Windows
Jenkins and Artifactory
Jenkins and Selenium Grid
Spinning up a Selenium Grid
Writing tests and integrating them into Jenkins
Jenkins and Jira
Summary
10. Extending Jenkins
Setting up the development environment
Creating a Jenkins plugin skeleton
The plugin skeleton
Importing a Maven-generated skeleton into IntelliJ
The architecture of Jenkins plugins
Understanding the Jenkins job lifecycle
Using overrides
Working with describables and descriptors
Jelly tags and files
Compiling and installing an HPI plugin
Summary
Index
2323__perlego__chapter_divider__2...

Table of contents