Continuous Integration - aapowers/BroadleafCommerce GitHub Wiki

Continuous Integration

Continuous integration is a development process in which the developers commit (check-in, merge, or integrate) their code into a shared repository at a certain frequency, often at least once per day. When they commit their code, an automated build begins and runs the automated tests. All developers can see the result of the build to ensure that the new code does not cause the build to break or any tests to fail. Continuous integration allows developers to find bugs, incompatible code, and regressions earlier in the development process, which generally results in smaller bugs that are easier to fix.

TravisCI

Getting Started

TravisCI is a tool that makes it easy to implement continuous integration. To get started, all we have to do is sign up on the TravisCI website, authorize permission, and add a simple .travis.yml file to the root of our repository. Following the very simple steps in TravisCI's getting started documentation should result in a working build.

Viewing Results

Once we commit the code with the .travis.yml file, the first automated build begins. We can track the progress of the build on the on the TravisCI website. After printing some initial build information, the output begins to look very similar to the output we see when we run the unit tests in Intellij IDEA.

When the build and tests are finished, we see the following: travisCI build success image

This output tells us that our build was successful. (See the green border on the left, green check-mark, green title, and green 'passed' note on the right).

Scrolling down, we see additional information on the build and tests (which might be more useful if the build failed because it would help us to debug): travisCI build info image travisCI test info image

Conveniently, TravisCI also sends us an email with the result when the build is complete: travisCI test info image

This is useful because the build might take a while, and we might want to be notified when it is finished. It is also useful because we might want to be notified when another developer commits code, because we will need to update our local repositories.

It only took about fifteen minutes to get this all set up and built for the first time. From this experience, TravisCI seems to be a really easy way to begin with continuous integration. It also allows for the setup of continuous deployment. After a successful build, TravisCI can be configured to automatically deploy the code to the production or live environment. Although I did not implement deployment for this project, based on their website, there are a lot of customizations that can be configured to get a specific setup.

⚠️ **GitHub.com Fallback** ⚠️