The Definitive Guide To Continuous Integration
The Definitive Guide To Continuous Integration
Table Of Contents
2.4 Go CD ............................................................................................. 16
2.8 Codeship.......................................................................................... 19
2.10 What Is the Perfect Continuous Integration Tool for You? .................... 21
3 Continuous Integration Tools for Mobile vs Web. What’s the Difference? ........ 22
1
The Definitive Guide To Continuous Integration
4.3 Fastlane........................................................................................... 33
4.6 Still Not Sure If You Should Use a Mobile CI Tool? ................................. 38
2
The Definitive Guide To Continuous Integration
While not every project is destined to achieve great success, there are
software methodologies and practices that can dramatically increase the
chance of success of a project and make the development more pleasurable
experience. One of such practices is Continuous Integration.
It was originally adopted as the extreme programming practice and its main
purpose is to prevent integration problems and to avoid "integration hell".
So let's learn what Continuous Integration is and how it can help you
become a better software developer.
This knowledge will make you more proficient than most people that blindly
walk into the CI world. After you've learned about what is the Continuous
Integration here head to the top Continuous Integration tools to choose the
one that fits you best.
If you are more into the mobile app development, you can also check the
Top Mobile Continuous Integration Tools list.
3
The Definitive Guide To Continuous Integration
Automating your build, test and deploy processes can alleviate much of the
headaches and problems commonly happening on projects. Having a reliable
method of integrating changes more frequently ensures that errors can be
found sooner than later. Having a blocking issue that appeared right on the
demo day as the result of some part of the code you implemented a few
months earlier and haven't had a proper chance to test against other parts
of your system is not a pleasant event at all.
We can all agree that having a blocking issue that appeared right in the
demo is not a pleasant experience. CI can help with that. A lot.
4
The Definitive Guide To Continuous Integration
Reduced integration risk. More often than not, working on projects means
multiple people are working on the separate tasks or parts of the code. The
5
The Definitive Guide To Continuous Integration
more people, the riskier the integration. Depending on how bad the problem
really is, debugging and solving the issue can be really painful and can
potentially mean a lot of changes to the code. Integrating on a daily basis or
even more frequently can help reduce these kinds of problems to a
minimum.
Higher code quality. Not having to worry about the problems, and focusing
more on the functionality of the code results in a higher quality product.
The code in version control works. If you commit something that breaks
the build, you and your team get the notice immediately and the problem is
fixed before anyone else pulls the "broken" code.
Less time deploying. Deploying projects can be very tedious and time-
consuming, and automating that process makes perfect sense.
Increased confidence and morale. People that don't work for fear of
breaking something, are more likely to produce better results and can focus
their energy and concentration on producing instead of worrying about
potential consequences of their actions.
One side effect of all these benefits is that new team members will have a
much easier time getting into the project. Having a clear vision of the
building process can greatly speed up adaptation of the newest dev on the
team.
6
The Definitive Guide To Continuous Integration
1.3 REQUIREMENTS
But you might be wondering what the requirements for the installing of the
CI system for your needs are. If you want to install CI server in your own
environment, you'll need a few things first.
The first requirement is having the version control system (VCS). There
is no way around it and there shouldn't be a way around it. VCS provides a
reliable method to centralize and preserve changes made to your project
over time.
If you don't want to mess with either servers or virtual machines, there are
many hosted CI tool solutions that abstract the maintenance of the whole
process and offer easier scalability. Disadvantages of the hosted systems are
usually the lack of configuration options that self-hosted tools offer.
If you opt-in for the self-hosted variant, you will need to install one of the
many available continuous integration tools.
Technically, the CI tool is not required per se, like the IDE is not required for
software development but it would be significantly harder to implement
Continuous Integration without the help of one.
The most widely known and used CI tools include Jenkins, TeamCity,
Bamboo, Go... Read more about the top CI tools available.
7
The Definitive Guide To Continuous Integration
8
The Definitive Guide To Continuous Integration
Besides these, features like code analysis, code coverage, code quality
reports, agent pooling, pipelines, build comparisons, IDE integration, third-
party tools support and many others make the CI servers very flexible and
comfortable to use.
There are six practices that help individuals and teams running CI on a
project:
That means you should not be checking in the latest changes just before the
lunchtime or just before you head home. You should wait for the build report
to be sure the build is successful, and if it is not you should be the one fixing
it.
9
The Definitive Guide To Continuous Integration
On the other hand, you should always be on a lookout for the broken builds,
even if it wasn't your fault because checking out broken build or checking in
over it can prolong the fixing process.
The graph below shows the differences between these three terms.
10
The Definitive Guide To Continuous Integration
There are some concerns that might discourage people from using the CI on
their projects.
You already need to build, test and deploy your systems. If you don't
manage those processes with the CI, you will be managed by those
processes. Once the project gets to the certain complexity, it becomes
incredibly hard to manage.
Hardware/Software costs.
Certainly, but they could be investing more time in building the functionality
and solving business problems. Machines excel in doing repetitive tasks
reliably.
11
The Definitive Guide To Continuous Integration
Even the smallest projects can benefit from CI. Especially with the plethora
of online Continuous Integration tools that are very easy to set up.
Even the smallest project can benefit from transparency of the development
process and centralization of project resources and builds.
1.8 SUMMARY
Infrequent software releases are a thing of the past and most of the leading
and successful companies are already actively using these techniques with
good results, Amazon being one of the leaders by making changes to
production every 11.6 seconds (May 2011).
Now that we know what CI is and that it can help us, let’s go through the list
of the best CI tools available on the market.
12
The Definitive Guide To Continuous Integration
If you are familiar with the concept of Continuous Integration we can agree
that using it has become mandatory. There are many Continuous
Integration tools out there, and we will go through some of the greatest
tools available on the market and see how they fare.
After reading this list you will have a better understanding what tools are
available to you and choose the perfect tool for yourself.
On the other hand, if you are interested in mobile apps, there is a specific
subset of tools that might suit you better, so check out our Top Mobile
Continuous Integration Tools List.
2.1 TEAMCITY
13
The Definitive Guide To Continuous Integration
Out of the box, TeamCity works on many different platforms and has the
support for wide variety of tools and frameworks. There are many publicly
available plugins, developed both by JetBrains and third parties.
Despite being the Java-based solution, TeamCity offers the best .NET
support among the tools on this list. There are also different enterprise
packages, that scale by the number of agents your company needs.
You can find a great in-depth case study on TeamCity here on our blog.
Verdict: Great solution overall, but due to its complexity and price, better
suited for enterprise needs.
2.2 JENKINS
What makes Jenkins very flexible is the feature extension through plugins.
Jenkins plugin list is very comprehensive and you can easily add your own.
Besides extensibility, Jenkins prides itself on distributing builds and test
loads on multiple machines. It is published under MIT license so it is free to
use and distribute.
14
The Definitive Guide To Continuous Integration
Cloudbees also offers hosted solution in the form of the Jenkins in the Cloud.
Verdict: One of the best solutions out there, both powerful and flexible at
the same time. The learning curve could be a bit steep, but if you need
flexibility it very well pays off to learn how to use it.
2.3 TRAVIS CI
Travis CI is free for all open source projects hosted on the GitHub and
for the first 100 builds otherwise. There are a few pricing plans you can
choose from, the main difference being the number of concurrent builds you
can run.
Builds are configured using .travis.yml file which contains the build tasks
that will be executed on running the build. It supports a variety of different
languages and a good documentation to back them up.
15
The Definitive Guide To Continuous Integration
everything else
Platform: Hosted and On-premises
2.4 GO CD
What makes Go stand out from the crowd is the concept of pipelines
which makes the modeling of the complex build workflows easy. On the
pipeline concept, how it can help with Continuous Delivery and how it
compares to Jenkins pipelines you can read here. Go CD supports pipelines
from scratch and eliminates build process bottlenecks with the parallel
execution of the tasks.
Official website: Go CD
Availability: Free with a paid support
Platform: On-premises for Windows, Mac and some Linux distributions
2.5 BAMBOO
16
The Definitive Guide To Continuous Integration
Bamboo is free to try for 30 days, and after that, there are two plans for
small and growing teams. Being the Atlassian tool, it has the native support
for JIRA and BitBucket and you can even import your Jenkins configurations
into the Bamboo easily.
2.6 GITLAB CI
17
The Definitive Guide To Continuous Integration
GitLab CI integrates seamlessly with GitLab and it can easily hook projects
using the GitLab API. GitLab runners that process builds are written in Go
language and can run on Windows, Linux, OSX, FreeBSD, and Docker.
The official Go runner can run multiple jobs concurrently and has inbuilt
Docker support. Gitlab CI comes with both the open-source GitLab
Community Edition and with the GitLab Enterprise Edition.
2.7 CIRCLECI
What separates CircleCI from the other tools is the way they offer services.
The main pricing block for the CircleCI is the "container". One container is
free and you can build as many projects on it as you need. Once you start
adding more containers (at a fixed price each) you can choose the level of
parallelization that suits your needs.
18
The Definitive Guide To Continuous Integration
There are 5 levels of parallelization (1x, 4x, 8x, 12x and 16x). So, starting
with the 16 containers, you can achieve maximum parallelization of 16x on
one build. Or you can run 4 builds on 16 containers with 4x parallelization. It
is up to you.
2.8 CODESHIP
Codeship comes in two different versions: Basic and Pro. Basic version offers
out-of-the-box Continuous Integration service but doesn't have docker
support and its main purpose is to build applications with common workflows
through the UI. Pro version offers more flexibility and docker support.
The basic version comes in several paid packages, where the more
expensive ones have more parallelization power. In the pro version, you get
to choose your instance type and the amount of parallelization up to 20x). It
can get a bit pricey, but some teams may need that kind of power.
19
The Definitive Guide To Continuous Integration
Verdict: Powerful hosted solution with docker support, flexible plans suited
both for small teams and enterprises alike.
Docker can be a bit overwhelming to figure out at first, and the guys from
the Codefresh inc. are well aware of that. In addition to working with
existing docker files, you can choose from several different templates to
ease the migration of your project to Docker containers. UI is clean and
intuitive, there is almost no need to parse through the documentation to
start using it.
The reason this CI tool deserves to be on the list lies in a feature that
surprised me a bit. And that feature is launching your images to a stage-
like environment. When the build finishes, you can launch the image to
see if it works! That effectively means you get a staging environment
without a need to provision additional virtual machines or deploy anything.
And that's great!
Codefresh is still very young and has room for improvement and new
features, (eg. .NET core template and more deployment options), but it
treats containers as a first class citizen and that makes it an ideal solution
for any team that plans to utilize Docker.
20
The Definitive Guide To Continuous Integration
Verdict: Easy to use tool with Docker containers at its core and very nice
feature of launching the built Docker images to the hosted environment.
There are several things to keep in mind when choosing the right CI tool for
your projects.
On the other hand, the hosted solutions offer no hassle setup and greater
scalability since you don't need hardware to host them.
And the last and often neglected aspect is the user interface. I found some
of the tools from the list much easier to use than others. You cannot say
with the clear conscious that the UI is not important because one of the
main roles of any good CI tool is to make a build process easier. It should
not be hard or complicated.
21
The Definitive Guide To Continuous Integration
Go mobile or go home!
Mobile apps have taken center stage in the world of software. With
seemingly unstoppable growth, the winner is the one who can deliver
healthy code to the end user faster.
This merciless race for the five-star rating has created a race for the
greatest mobile DevOps tools and methods that can help you stay in the
competition and deliver high-quality code faster.
So, let's dig into what makes building mobile apps so different from web
apps? Secondly, why you really need to implement a continuous integration
tool tailored for mobile to build kick-ass applications... FAST!
22
The Definitive Guide To Continuous Integration
install dependencies, build your app and test it. And this is where the
challenges pop in.
Real devices: The vast variety of mobile devices, all with their own
specifics, can outperform the emulator/simulator in terms of bug detection,
23
The Definitive Guide To Continuous Integration
The next step for a web app would be to deploy the application to a hosting
service, making the new version of the web application immediately
available to the public. And again, this is not how things work for mobile
apps!
To begin with, all mobile platforms have a set of guidelines to which all apps
must adhere to be accepted into the official stores. For an example, you can
take a look at Google’s. Apple goes a step further and requires your app’s
code to be signed. For this purpose, you will need to obtain a digital
certificate and a provisioning profile from Apple.
Once your app meets all the necessary requirements of one or multiple
mobile platforms, the next step is to get it into Apple’s and Google’s walled
24
The Definitive Guide To Continuous Integration
In addition to the release channels described above, you may wish to publish
your builds elsewhere. Most web developers are familiar with the concept of
environments — “dev” for development work, “staging” for testing by a
small group of users or a client, and “master” for wide distribution to the
public. Same concepts apply to mobile app development. It’s only the
“master” branch of your project that you’ll want to submit to Apple or
25
The Definitive Guide To Continuous Integration
Google. Before that, you’ll want to have the beta version of the app
evaluated by your teammates or — if you have them — dedicated beta-
testers. The simplest by far is to configure the CI tool to distribute the app
via email to the addresses you provide.
While this is very straight-forward, you can get a lot more out of your beta
testers if you connect with them via a third party, such as HockeyApp,
Crashlytics, or TestFairy. These services will not only help you with
distribution but can also monitor crashes, provide detailed reports, and
collect user feedback. Here, too, many CI tools for mobile, have your back
with optional automatic publishing to all three.
Once again, it feels like we’re going back in time. “Fragmentation” was not
a concept that applied to web applications, but mobile brings it roaring back.
Just because an awesome new version of your app is available, there is no
reason to expect your entire user base to install it ASAP. (But you won’t
have to wait too long before seeing their 1-star reviews pour in!) Having to
do upgrade testing and supporting multiple versions of your software
simultaneously is not an easy task no matter how you slice it. Luckily, a
good mobile-oriented CI service can help here by keeping a reliable version
record of the binaries it builds. You can then use these as a reference when
handling user issues.
Do you still think Jenkins, will do the job? Check, the maintenance side of
Jenkins.
26
The Definitive Guide To Continuous Integration
3.4 WRAP-UP
Here’s a quick summary of the key differences between web and mobile CI
you should be aware of before getting started:
The only right way to compete in today’s mobile-first world is to adopt the
best tools for mobile app development. You will undoubtedly discover that a
continuous integration service tailored for mobile development is a needed
tool. The real power of CI for mobile application lies in automating the
mundane and error-prone tasks, thereby letting you spend more time doing
27
The Definitive Guide To Continuous Integration
what you love — writing the code. As with any tool, a proper understanding
of how CI works within a particular setup is critical for getting the most out
of it without undue effort and frustration.
28
The Definitive Guide To Continuous Integration
Well, the answer to that is surprisingly simple and the big software
development companies are already doing that for years.
We've talked about the importance of continuous integration, and about the
difference between web and mobile continuous integration tools.
It seems that companies that create mobile apps are still not fully aware of
the importance of the CI/CD tools in their development process. Continuous
integration tends to be overlooked when you have small teams working on
an app, or when an app is not big enough. This is a wrong way to look at it
and whatever you do or create, you can benefit from using a CI tool.
Our focus will be on the CI tools that specialize in mobile apps only.
29
The Definitive Guide To Continuous Integration
4.1 NEVERCODE.IO
The first continuous integration & delivery tool on our list is Nevercode.io, a
polished and robust tool to fully automate your mobile app build and test
process.
30
The Definitive Guide To Continuous Integration
Encryption of data
First class support
If you ever find yourself stuck you can check the comprehensive
documentation pages and blog, or talk to the support team.
Verdict: Polished and modern tool, with a heap of very neat features,
flexible pricing plans, 14-day trial period, comprehensive documentation
pages and lively support.
31
The Definitive Guide To Continuous Integration
As you might have guessed it by the name, Visual Studio App Center comes
from Microsoft labs. Microsoft is known to have both good and bad products
(looking angrily at Skype). So let's see which side the App Center is on.
At first glance, you get a simplistic design, but when you dig deeper you get
a lot of goodies out of the box. As you can see in the picture above, App
Center supports a lot of different kinds of applications, and can automatically
detect what app you want to build.
When you decide to use App Center, you can count on:
Support for: iOS, Android, Windows, React Native, Xamarin, and even
more apps
Intuitive but powerful UI
Integration with GitHub, BitBucket, and VSTS
Push notifications
"Crash reports so nice, you’ll almost want your app to crash."
A lot of analytics and charts
There is a free 30-day trial period which includes 240 build minutes per
month, unlimited users, analytics and crash reports, up to 5 audience
segments for push notifications. You can scale your plans by adding
additional build concurrencies or by adding device testing concurrency which
is a nice feature, but a bit pricey.
Verdict: Simplistic but powerful tool from Microsoft, with a focus on parallel
device testing, push notifications for audience segments, and a ton of useful
analytics and crash reports.
32
The Definitive Guide To Continuous Integration
4.3 FASTLANE
Fastlane is a bit different from the tools we've seen so far, in a sense that it
is open source under the MIT license and it's a Google project which means
Google Privacy Policy and Terms of Service apply to it. You can freely
become a contributor and make this tool even better.
The other difference is that it's not a hosted solution, but you need to install
it on your machine (Similarly to what you do with TeamCity for example).
To install Fastlane you need to have the latest version Xcode command line
tools installed. The complete tutorial on how to install Fastlane is described
in the documentation pages.
Currently, Fastlane is only supported for MacOS, but the team is looking to
expand it to Linux and Windows.
33
The Definitive Guide To Continuous Integration
There are no pricing plans, Fastlane is completely free and open source, so
you can play with it and customize it to your own liking.
Verdict: Open-source tool under MIT license, a bit different and maybe not
so rich in features like the other tools from this list, but the open-source
nature leaves a lot of room for customization. Since it's an on-premises tool,
you know where your data is and that might be important to some of you or
your clients.
34
The Definitive Guide To Continuous Integration
4.4 BITRISE.IO
Another great mobile ci tool, Bitrise.io made by the company of the same
name.
You can get a quick look at the state of app development in 2017 on the
Bitrise.io blog.
35
The Definitive Guide To Continuous Integration
36
The Definitive Guide To Continuous Integration
4.5 BUDDYBUILD
The last tool on our list is buddybuild. We've saved it for the last because it
doesn't seem to stand out in a crowd in any way. Furthermore, the UI of the
home page is not clear enough on how to get started with the app or what
the pricing plans are.
We've tried logging in with both GitHub and BitBucket and we got the
following page:
37
The Definitive Guide To Continuous Integration
Trying to find the solution in the documentation pages didn't help us either.
Trying to contact the support hasn't gone any better, we've got a lot of
ambiguous answers, that haven't helped us understand what is happening
with the service or how to use it. Upon further investigation, we've learned
that buddybuild has been bought by Apple and that it's not open to new
customers or Android projects.
We'll leave the tool on this list since we don't have any more information for
now.
CI tools have come a long way recently and there isn't much overhead if you
want to start using a CI tool. On average, setup phase only takes a few
minutes, and it's a well-known fact that earlier in the lifecycle you catch the
bug, the less of the cost you'll have later.
38
The Definitive Guide To Continuous Integration
As you can see it's pretty straightforward. The earlier you catch the bug, the
less damage it makes.
So are you willing to make the leap of faith and not use one of the CI tools
for your mobile app?
4.7 SUMMARY
39