Following are the key principles of Continuous
integration.
Revision Control
Revision Control is the basic standard which any
software development team is following for the last couple of
decades. The purpose of revision control which is also termed as
version control or source control is to manage the changes made in
the files that make up the code for a software project. It also
allows us to switch back and forth within different versions of
code using a single command, provided the changes are committed
properly. In short, Revision Control not only makes our code base
manageable while dealing with making/moving between changes, it
also makes it much easier for the developers to integrate their
code. This is the root of Continuous Integration; it is the best
investment though most version control systems are free that an
organization can make to ensure a cool life of the
developers.
Build Automation
Build Automation is the ability to either
automatically trigger and/or build a clean version of the entire
source code using a single command or action using raw components.
Most teams now take this further and allow their systems to be
built completely from the code which is obtained directly from
their version control system. This process has the ability to take
a 30 minute task and wrap it up in few seconds. Establishing the
patterns that the developers perform to start a clean or new system
and also the environment for which the build is to be built, e.g.
whether this be a production, staging, or development build saves
our time in the long term.
Automated Deployment
Automated Deployment is the process in which we
consistently keep on pushing a product to various environments with
the help of some “trigger”. This allows us to quickly
learn what is to be expected every time we deploy an environment
having a much faster results. This combined with Build Automation
has the ability to save a significant amount of hours for the
development teams.
Automated Deployment saves the customers from
being extensively offline while deployment and also it allows the
developers to build with disturbing less number of clients systems.
With an automated system, human error is prevented. In the event of
human error, developers are able to catch it before live
deployment
Self-Testing Builds
Testing can happen in multiple ways using the
methods which we have probably heard as buzzwords. Some of these
include automated testing e.g. unit testing and interface testing.
Self-testing Builds are the next step. Once you have tests which
can be automated, executing them simultaneously with a build is
usually an easy job. The teams should have more awareness on what
is going on with the product. Obviously, the more we test the
greater visibility we have on the status of our product before the
release. This is probably the difference between being a reactive
or a proactive. It must be remembered that: Testing is only as good
as the environment in which you test it.
Testing in a Clone of Production
It is common practice that every developer has
the story of burning the proverbial midnight oil since their build
didn't work on the production environment while the same is
perfectly running on the staging or development environments. We
must ensure that our testing environment is as close to production
as possible. This approach minimizes this risk.
Frequent Commits
Whenever we commit a code we are creating a new
version in the version control system. This marks a point in the
history of the code base where anyone is allowed to switch over to
that point and use the changes made. In fact, each and every
release of the product may include thousands of commits. This is a
very good approach - the more modular the commits, the easier it is
for developers to merge, move, add, and remove changes as per their
need. This approach also gives a point of comfort, because if
something does go wrong, they can start back where they were the
last time they committed work.
Code Consolidation
Code Consolidation is typically the best thing at
the end of the day. This is the time when all development features
are compiled and merged. It has some good features: -
-
Developers need to spend less time trying to merge their changes
with one another.
- If the
Automated Build is enabled on a test server and those builds are
Self-testing Builds, we should be able to track the performance of
your product throughout production.
- It gives
visibility to all the developers across the team. Every developer
is now aware of what code other developer is writing.
Fast Builds
Time is money. Faster Builds saves lot of time.
Faster Build mechanism allow the developers to get on their feet
faster, receive test results faster and see the product
faster.
Build Availability
It is very important to have a current
development and staging build available at all times. Regardless of
the Automated Testing, there are few things which a computer cannot
detect
Test Result Availability
It is very important to check which test passed
and which failed. Availability of the Test Result gives us the
visibility on the results to developers, managers and client
stakeholders.