Book Image

Hands-On Continuous Integration and Delivery

By : Jean-Marcel Belmont
Book Image

Hands-On Continuous Integration and Delivery

By: Jean-Marcel Belmont

Overview of this book

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.
Table of Contents (18 chapters)

Debugging build locally with Docker

You can debug a build locally by pulling down a Docker image that is held in the documentation link, Troubleshooting Locally in a Docker Image (https://docs.travis-ci.com/user/common-build-problems/#Troubleshooting-Locally-in-a-Docker-Image). You can find the instructions to install Docker in this link (https://docs.docker.com/install/).

  1. Pull down the Go Docker image:
docker pull travisci/ci-garnet:packer-1512502276-986baf0

Notice that we run the docker pull command to actually pull down the Docker image

  1. Start the interactive Docker session:

Notice here that we ran an interactive shell session in detached mode

  1. Open a login shell in the running container:
docker exec -it travis-debug bash -l

This command starts an interactive shell session with the running Docker container using a Bash shell

  1. Switch to the Travis user:
su - travis

In...