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)

Adding a simple Travis CI YAML configuration script

I created a sample GitHub repository that you can see at functional summer at Github (https://github.com/packtci/functional-summer). This repository is a Node.js project that has a package.json script, a file called summer.js and a test file called summer_test.js. We will add configuration for Travis CI in a file called .travis.yml at the root of the repository. This configuration script will do a couple of things. First, it will notify Travis CI that we are running a Node.js project and then it will install the dependencies for the project, and last it will run the tests specified in the CI build.

Travis CI YML script contents

We will first create a file called .travis.yml...