In our previous blog posts, Our journey to microservices: mono repo vs multiple repositories, we shared our thoughts and experiences on our approach with monorepo. We received a few questions after that blog on how CI and deploys go with the monorepo.
In this article we will learn how to run CI, build and deploy applications independently from a monorepo. On each PR/commit we will run tests on the service which has changed build a docker image from it and push it to a registry. This image can then be deployed to to a cluster on any supported Container Service. We will use Shippable for this scenario.
When appropriate tools & technology are available in abundance, automation is considered the primary resource to improve the efficiency of any software development process. Faster innovation cycles and speed to market are crucial to a business. With the very same principle in mind Shippable was founded so that software powered organizations could accelerate innovation. Shippable provides an integrated platform, using which you can automate your software delivery from source control to production, without needing to write complex, imperative code.
In this tutorial we will learn how to create an end to end deployment for a single service, with source code maintained in a repository on github. We will also see how to trigger tests every time the deployed environment is updated or your test cases are updated.
Nightly builds means running an automated build for a project once a day, usually after the end of the day. It is often a good practice run automated builds every time you make some change to your codebase. These automated builds help you maintain a healthy code base.
Automated builds help in finding out a number of problems like:
- A team member checked in something that breaks the codebase.
- Your dependencies have changed and they break your code.
- Your dependencies are broken.
- Your build scripts or build machine is broken.
Nightly builds ensures that you catch such problems within 24 hours of when they occur.
A Docker image registry service makes it easy for developers to store, manage, distribute and deploy Docker images. Use a registry service to control the storing of your images, fully own your images distribution pipeline and integrate image storage and distribution tightly into your in-house development work flow.
This blog covers "Pushing a Docker image to a registry of your choice" scenario in the Docker in Continuous Integration (CI) series. We'll go over a simple example and look at advanced scenarios of using Docker images within CI and Continuous Delivery (CD) Pipelines.