Book description
Understand various tools and practices for building a continuous integration and delivery pipeline effectively
Key Features
- Get up and running with the patterns of continuous integration
- Learn Jenkins UI for developing plugins and build an effective Jenkins pipeline
- Automate CI/CD with command-line tools and scripts
Book Description
Hands-On Continuous Integration and Delivery starts with the fundamentals of continuous integration (CI) and continuous delivery (CD) and where it fits in the DevOps ecosystem. You will explore the importance of stakeholder collaboration as part of CI/CD.
As you make your way through the chapters, you will get to grips with Jenkins UI, and learn to install Jenkins on different platforms, add plugins, and write freestyle scripts. Next, you will gain hands-on experience of developing plugins with Jenkins UI, building the Jenkins 2.0 pipeline, and performing Docker integration. In the concluding chapters, you will install Travis CI and Circle CI and carry out scripting, logging, and debugging, helping you to acquire a broad knowledge of CI/CD with Travis CI and CircleCI.
By the end of this book, you will have a detailed understanding of best practices for CI/CD systems and be able to implement them with confidence.
What you will learn
- Install Jenkins on multiple operating systems
- Work with Jenkins freestyle scripts, pipeline syntax, and methodology
- Explore Travis CI build life cycle events and multiple build languages
- Master the Travis CI CLI (command-line interface) and automate tasks with the CLI
- Use CircleCI CLI jobs and work with pipelines
- Automate tasks using CircleCI CLI and learn to debug and troubleshoot
- Learn open source tooling such as Git and GitHub
- Install Docker and learn concepts in shell scripting
Who this book is for
Hands-On Continuous Integration and Delivery is for system administrators, DevOps engineers, and build and release engineers who want to understand the concept of CI and gain hands-on experience working with prominent tools in the CI ecosystem. Basic knowledge of software delivery is an added advantage.
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
- CI/CD with Automated Testing
- Basics of Continuous Integration
-
Basics of Continuous Delivery
- Technical requirements
- Problems delivering software
- Configuration management
- Deployment pipeline
- Deployment scripting
- Deployment ecosystem
- Summary
- Questions
- Further reading
- The Business Value of CI/CD
- Installation and Basics of Jenkins
- Writing Freestyle Scripts
- Developing Plugins
- Building Pipelines with Jenkins
-
Installation and Basics of Travis CI
- Technical requirements
- Travis CI introduction
- Travis CI prerequisites
- Adding a simple Travis CI YAML configuration script
- Travis CI script breakdown
- Summary
- Questions
- Further reading
-
Travis CI CLI Commands and Automation
- Technical requirements
- Travis CLI installation
-
Travis CLI commands
- Non-API commands
-
API commands
- Logging in to Travis CI
- Displaying the current access token
- Logging out of Travis CI
- Displaying accounts information
- Interactive console session
- Printing API endpoint Information
- Conducting live monitoring with all the CI builds that are currently running
- Initiating a Travis CI API call 
- Printing out important system configuration information
- Listing all the repositories that the currently logged in user has access to
- Initiating synchronization with Travis CI for any new or outdated repositories in GitHub
- lint - a Travis YML script
- Obtaining current build information for the organization or user
- Finding the currently logged-in user information
-
Repository commands
- Displaying the most recent build information for each branch in Git version control
- Listing cache information for all the repositories
- Deleting cache information for a given repository
- Enabling a repository in Travis CI
- Disabling a repository in Travis CI
- Cancelling the latest build in Travis CI
- Encrypting environment variables or deployment keys
- Encrypting a file
- Listing environment information
- Setting an environment variable
- Deleting an environment variable
- Clearing out all environment variables
- List history information for recent builds
- Initializing Travis CLI on a project
- Printing out CI build log information
- Opening the Travis web interface for the project
- Printing out public key information for the repository
- Restarting the latest CI build in Travis CI
- Printing out current build requests in Travis CI
- Printing out particular repository settings
- Configuring Travis CI add-ons
- Displaying general information for the current CI build
- Listing SSH key in Travis CI
- Displaying status information for the current build
- Travis CI options for Pro version and Enterprise version
- Summary
- Questions
- Further reading
-
Travis CI UI Logging and Debugging
- Technical requirements
- Travis web client overview
- Debugging build locally with Docker
-
Running build in debug mode
- Getting an API token from the profile page
- Obtaining a job ID from the build log
- Obtaining the job ID from the URL in the View config button 
- Obtaining the job ID via an API call to the /builds endpoint
- API call to start a build job in debug mode
- Fetching an SSH session for the debug mode
- Travis debug mode convenience Bash functions
- tmate shell session actions
- Travis Web UI logging
- Travis CI deployment overview and debugging
- Summary
- Questions
- Further reading
- Installation and Basics of CircleCI
- CircleCI CLI Commands and Automation
- CircleCI UI Logging and Debugging
-
Best Practices
- Technical requirements
- Best practices for different types of testing in CI/CD
- Best practices in password and secrets storage
- Best practices in deployment
- Summary
- Questions
- Further reading
-
Assessments
- Chapter 1: CI/CD with Automated Testing
- Chapter 2: Basics of Continuous Integration
- Chapter 3: Basics of Continuous Delivery
- Chapter 4: The Business Value of CI/CD
- Chapter 5: Installation and Basics of Jenkins
- Chapter 6: Writing Freestyle Scripts
- Chapter 7: Developing Plugins
- Chapter 8: Building Pipelines with Jenkins
- Chapter 9: Installation and Basics of Travis CI
- Chapter 10: Travis CI CLI Commands and Automation
- Chapter 11: Travis CI UI Logging and Debugging
- Chapter 12: Installation and Basics of CircleCI
- Chapter 13: Circle CI CLI Commands and Automation
- Chapter 14: Circle CI UI Logging and Debugging
- Chapter 15: Best Practices
- Other Books You May Enjoy
Product information
- Title: Hands-On Continuous Integration and Delivery
- Author(s):
- Release date: August 2018
- Publisher(s): Packt Publishing
- ISBN: 9781789130485
You might also like
book
Continuous Integration vs. Continuous Delivery vs. Continuous Deployment, 2nd Edition
Continuous integration, continuous delivery, and continuous deployment are key software delivery processes in a DevOps environment. …
book
Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation
Winner of the 2011 Jolt Excellence Award! Getting software released to users is often a painful, …
book
Continuous Delivery with Docker and Jenkins - Third Edition
Create a complete continuous delivery process using modern DevOps tools such as Docker, Jenkins, Kubernetes, Ansible, …
video
Hands-On Continuous Integration and Automation with Jenkins
In agile development practices, developers need to integrate their work frequently to fix bugs or to …