0% found this document useful (0 votes)
161 views40 pages

The Definitive Guide To Continuous Integration

This document provides an overview of continuous integration (CI), including what it is, its benefits, requirements, and common CI tools. CI involves continuously integrating code changes and testing the integrated codebase at least daily. Benefits include reduced integration issues, higher code quality, and improved developer productivity and morale. Requirements for implementing CI include a version control system and a server or virtual machine to run the CI software on. Common CI tools discussed include Jenkins, TeamCity, Travis CI, Go CD, Bamboo, GitLab CI, CircleCI, and Codeship.

Uploaded by

aarsh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views40 pages

The Definitive Guide To Continuous Integration

This document provides an overview of continuous integration (CI), including what it is, its benefits, requirements, and common CI tools. CI involves continuously integrating code changes and testing the integrated codebase at least daily. Benefits include reduced integration issues, higher code quality, and improved developer productivity and morale. Requirements for implementing CI include a version control system and a server or virtual machine to run the CI software on. Common CI tools discussed include Jenkins, TeamCity, Travis CI, Go CD, Bamboo, GitLab CI, CircleCI, and Codeship.

Uploaded by

aarsh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

[Type here]

The Definitive Guide To Continuous Integration

Table Of Contents

1 What Is Continuous Integration and Why Do You Need It? ............................. 3

1.1 What Is Continuous Integration? ........................................................... 3

1.2 Benefits of Using Continuous Integration ............................................... 5

1.3 Requirements ..................................................................................... 7

1.4 Continuous Integration Servers ............................................................ 8

1.5 Everyone is responsible ....................................................................... 9

1.6 Continuous Delivery and Continuous Deployment.................................. 10

1.7 Potential pitfalls ................................................................................ 11

1.8 Summary ......................................................................................... 12

2 Top Continuous Integration Tools ............................................................. 13

2.1 Jenkins ............................................................................................ 14

2.2 TeamCity ......................................................................................... 13

2.3 Travis CI .......................................................................................... 15

2.4 Go CD ............................................................................................. 16

2.5 Bamboo ........................................................................................... 16

2.6 GitLab CI ......................................................................................... 17

2.7 CircleCI ........................................................................................... 18

2.8 Codeship.......................................................................................... 19

2.9 Honorable mention: Codefresh ........................................................... 20

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

3.1 CI for Mobile Apps vs Web Apps .......................................................... 22

3.1.1 Testing Mobile Apps vs Web Apps .................................................. 23

1
The Definitive Guide To Continuous Integration

3.1.2 Distributing Mobile Apps vs Web Apps ............................................ 24

3.2 Beta Testing ..................................................................................... 25

3.3 Supporting Legacy Code .................................................................... 26

3.4 Wrap-Up .......................................................................................... 27

4 Top Mobile Continuous Integration Tools ................................................... 29

4.1 Nevercode.io .................................................................................... 30

4.2 Visual Studio App Center ................................................................... 31

4.3 Fastlane........................................................................................... 33

4.4 Bitrise.io .......................................................................................... 35

4.5 Buddybuild ....................................................................................... 37

4.6 Still Not Sure If You Should Use a Mobile CI Tool? ................................. 38

4.7 Summary ......................................................................................... 39

2
The Definitive Guide To Continuous Integration

1 WHAT IS CONTINUOUS INTEGRATION AND WHY DO


YOU NEED IT?

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.

1.1 WHAT IS CONTINUOUS INTEGRATION?

Continuous Integration is the practice of continuously integrating the


changes made to the project and testing them accordingly at least on a daily
basis or more frequently.

3
The Definitive Guide To Continuous Integration

Martin Fowler put it nicely:

Continuous Integration is a software development practice where members


of a team integrate their work frequently, usually each person integrates at
least daily – leading to multiple integrations per day. Each integration is
verified by an automated build (including test) to detect integration errors as
quickly as possible. Many teams find that this approach leads to significantly
reduced integration problems and allows a team to develop cohesive
software more rapidly.
Martin Fowler

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

Here is how the basic CI lifecycle looks like.

1.2 BENEFITS OF USING CONTINUOUS INTEGRATION

Using CI is beneficial for many reasons.

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.

Reduced friction between team members. Having the impartial system


in place reduces the frequency of quarrels between team members.

The quality of life improvement for testers. Having different versions


and builds of the code can help isolate and trace bugs efficiently, and it
makes life easier for the QA team.

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 are using onsite solutions another requirement is to have a spare


server or workstation or at the very least a virtual machine. Having a clean
machine to build your system on is of the essential importance.

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

1.4 CONTINUOUS INTEGRATION SERVERS

Continuous integration server (aka build server, aka CI server) is a software


tool that centralizes all your CI operations and provides a reliable and stable
environment for you to build your projects on. CI servers are highly
configurable and adjustable to be able to build a variety of projects for
different platforms. Running builds and tests are the basic features of every
build server.

The most important things to consider when using CI server is to have a


clean machine prepared for its installation. Having a neutral environment,
untainted by unnecessary tools, environment variables, and other
configurations, is crucial for the successful usage of the CI server and CI
overall. If it's not possible to install the CI server physical machine, you
can set up a virtual environment and use it as the last resort.

Using development machines without setting up virtual environments will


probably leave you with false assumptions and results. Once you deploy the
application to another machine, you could potentially run into new problems.

Typically CI server uses a version control system like Subversion or Git or


any other to pull your project files. It monitors your project's repository and
on the successful commit it pulls the changes and performs the tasks you
defined previously for that project. Upon completion of the tasks, CI server
sends feedback to the relevant project members with the details of the build.
Checking out the latest version of your project, running the build
scripts, running the tests, and sending notifications are the most basic
functionalities of the CI servers.

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.

1.5 EVERYONE IS RESPONSIBLE

Even more important than hardware or software requirements is the ability


of the team to take the responsible approach to implementation of the CI. In
order to use CI effectively, developers must change their day-to-day
software development habits. These habits are good software development
practices that you should apply even without continuous integration system
in place.

There are six practices that help individuals and teams running CI on a
project:

 Commit code frequently


 Don’t commit broken code
 Write unit tests
 Fix broken builds immediately
 All tests must pass
 Avoid breaking code

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.

1.6 CONTINUOUS DELIVERY AND CONTINUOUS DEPLOYMENT

Typical CI lifecycle consists of building the project, unit testing, deploying to


stage and acceptance testing. Once the project successfully passes all of
these stages, it is ready for the deployment to the production environment.

Delivering a project to the production environment can be done


automatically like the rest of the stages. But due to the business concerns, it
might be more suitable to do it manually. In the first case, we are talking
about Continuous Delivery, and in the second Continuous Deployment.

The graph below shows the differences between these three terms.

10
The Definitive Guide To Continuous Integration

1.7 POTENTIAL PITFALLS

There are some concerns that might discourage people from using the CI on
their projects.

Increased project maintenance overhead.

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.

Too much change.

People might be unwilling to make so many changes to implement the CI on


their legacy system. If that is the case, you can easily introduce CI to the
system one part at a time. Once the team members are comfortable with
the results, CI can be introduced to the other parts as well.

Hardware/Software costs.

Costs of implementing a CI could be perceived as unnecessary by both


developers and management on a project. But these costs are marginal
compared to the costs of the maintenance and finding the problems later
down the line.

Developers are already doing all these operations.

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

Project too small.

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

Agile practices and Continuous Integration go hand in hand. You can't


consider your work or business serious without using CI anymore.

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).

Setting up the continuous integration system for your project could be


potentially costly and time-consuming task. But technical debt caused by not
using CI can be multiple times bigger.

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

2 TOP CONTINUOUS INTEGRATION TOOLS

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.

So without further ado and in no particular order of importance, I present


you the list of the top 8 Continuous Integration tools:

2.1 TEAMCITY

TeamCity is the mature CI server, coming from the labs of


the JetBrains company. JetBrains has established authority
in the software development world, and developers all over
the world use their tools like WebStorm and ReSharper.

TeamCity offers all the features in its free version, but it is


limited to the 100 build configurations and 3 build agents. Additional
build agents and build configurations need to be purchased. Recently
JetBrains started offering a cloud trial of TeamCity where you can try it out
for one project without a hassle of having to install it on-premises. It lasts
60 days and you can export the project afterward.

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.

Official website: TeamCity


Availability: Free for 3 agents and 100 build configurations and paid
enterprise edition
Platform: Servlet container (On-premises), cloud trial

2.2 JENKINS

Jenkins is an open-source CI tool written in


Java. It originated as the fork of
Hudson when the Oracle bought the Sun
Microsystems. Jenkins is a cross-platform CI tool and it offers configuration
both through GUI interface and console commands.

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.

Official website: Jenkins


Availability: Free
Platform: Cross-platform

2.3 TRAVIS CI

Travis CI is one of the oldest hosted solutions out there


and it has won the trust of many people. Although it's
mostly known for the hosted solution, it offers the on-premise version too in
a form of enterprise package.

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.

Verdict: A Mature solution that offers both hosted and On-premises


variants, loved and used by many teams, very well documented.

Official website: Travis CI


Availability: Free for open source plans and first 100 builds, paid plans for

15
The Definitive Guide To Continuous Integration

everything else
Platform: Hosted and On-premises

2.4 GO CD

Go is the newest Cruise Control incarnation from the


ThoughtWorks company. Excluding the commercial
support that ThoughtWorks offers, Go is free of
charge. It is available for Windows, Mac, and various Linux distributions.

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.

Verdict: On-premises solution, great for complex scenarios, free of charge


with paid support.

Official website: Go CD
Availability: Free with a paid support
Platform: On-premises for Windows, Mac and some Linux distributions

2.5 BAMBOO

Atlassian is a company focused on providing tools for


software development teams and you might know
them by their tools like JIRA and Bitbucket. Bamboo originally offered both
cloud and On-premises solutions, but in the May 2016 the cloud version was

16
The Definitive Guide To Continuous Integration

discontinued in the favor of the Bitbucket pipelines (accessible through the


left panel of your Bitbucket account).

By utilizing the power of Docker, Bitbucket Pipelines is offering very efficient


and fast builds that and is rapidly growing and becoming a worthy successor
to the Bamboo Cloud.

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.

Verdict: Great On-premises CI tool that originally offered Cloud solution


too. Bitbucket Pipelines replaced the cloud solution. Pipelines is a modern
and fast cloud CI tool integrated into Bitbucket. Has a free trial for 30 days,
and paid plans after that.

Official website: Bamboo


Availability: Paid with a free trial
Platform: On-premises

2.6 GITLAB CI

GitLab CI is an integral part of the open-source


Rails project GitLab, which was brought to light by
the company GitLab inc. It is hosted on
GitLab.com, a free hosted service and it provides detailed git repository
management with features like access control, issue tracking, code reviews
and much more.

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.

Verdict: A Phenomenal hosted tool with impressive list of features, offers


both free and enterprise solutions.

Official website: GitLab CI


Availability: Free and paid with trial
Platform: Hosted (can be hosted for you on Gitlab.com)

2.7 CIRCLECI

Another cloud alternative that comes


from the company with the same
name. CircleCI currently only supports
GitHub and the list of supported
languages includes Java, Ruby/Rails, Python, Node.js, PHP, Haskell, and
Scala.

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.

And did I mention CircleCI supports Docker?

Verdict: Flexible cloud CI tool that offers parallelization up to 16x. Excellent


if you need something built fast and money is not the biggest issue (can
reach up to $3150/mo).

Official website: CircleCI


Availability: Free and paid with trial
Platform: Hosted

2.8 CODESHIP

If you haven't had enough hosted


solutions up until now, here is another
one.

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.

Official website: Codeship


Availability: Free for 100 builds per month and paid for more than that
Platform: Hosted

2.9 HONORABLE MENTION: CODEFRESH

Many tools on this list have Docker support, but


Codefresh was designed and built from the ground up specifically with the
containers in mind.

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.

Official website: Codefresh


Availability: Free for 200 builds per month, 5 concurrent builds, and 1
hosted environment, paid for additional stuff
Platform: Hosted and On-Premises via Kubernetes and Helm Charts

2.10 SO, WHAT IS THE PERFECT CONTINUOUS INTEGRATION TOOL


FOR YOU AND YOUR TEAM?

There are several things to keep in mind when choosing the right CI tool for
your projects.

On-premises solutions offer a great deal of build process flexibility and


store the artifacts locally. This may or may not be important to you, but
in some cases and for some companies, it might be mandatory.

On the other hand, the hosted solutions offer no hassle setup and greater
scalability since you don't need hardware to host them.

Another important thing is the Docker support. Docker revolutionalized the


way we distribute our apps and has become something you should not
ignore. Although the vast majority of the tools support Docker, some take it
more seriously than others.

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

3 CONTINUOUS INTEGRATION TOOLS FOR MOBILE VS


WEB. WHAT’S THE DIFFERENCE?

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.

People often underestimate the complexity of the mobile ecosystem. Mobile


brings with it a whole set of unique challenges that make implementing CI
for it difficult. Continuous integration as a practice is nothing new to
developers building web apps; however, when you’re developing mobile
apps, you’ll learn that CI/CD tailored specifically for mobile has a lot to offer
to the process. While the CI concept remains the same, its practicalities are
somewhat different.

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!

3.1 CI FOR MOBILE APPS VS WEB APPS

The foundational building blocks and the workflow of the continuous


integration process for mobile mirror those of web app development: you
write a code, commit, push, and then watch the CI service fetch your repo,

22
The Definitive Guide To Continuous Integration

install dependencies, build your app and test it. And this is where the
challenges pop in.

3.1.1 Testing Mobile Apps vs Web Apps


It’s never too early to begin testing an application. If the end-user perceives
bad performance from your app, their next click will likely be on your
competitors.
While all types of performance, QA, and functional tests as well as non-
functional tests, such as UX testing, are the same for mobile and web,
running functional tests on a mobile application requires the use of an
emulator/simulator or a physical device.

Simulators/emulators: Virtual environments can save you lots of time and


money by expanding your testing coverage to multiple devices, so you can
be more confident to deliver code that works on (almost) all the devices.

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

which is why you’ll need to test on physical handsets to reveal device-


specific bugs. With a cloud-based device lab like Firebase Test Lab for
Android or Amazon Web Services (AWS) Device Farm, you can run tests and
interact with a large selection of physical devices without actually having to
invest in their ownership or setup.

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!

3.1.2 Distributing Mobile Apps vs Web Apps


The difference at the deployment stage comes down to the distribution
model. In many ways, mobile apps take us back to the days of shipping
shrink-wrapped CDs for each new version of our software. A single copy of
your web application is the only thing needed to make it available to the
entire world. By contrast, hundreds, thousands and (hopefully) millions of
copies of your mobile app will need to be delivered to users’ phones. And
while you have full control of the deployment pipeline for your web app,
someone else is in charge of the mobile distribution channels and you have
to be ready to play by their rules.

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

gardens. While using a mobile CI service, such as Nevercode, cannot


shortcut this, it can make things significantly less painful by automating
the key steps. Once a build completes successfully, mobile focused CI
service can automatically publish your build artifacts — i.e. distribution
packages for Android and/or iOS — to the relevant channels. For instance,
you can set up CI tool to send your successful release builds directly to
iTunes Connect —- Apple’s pipeline for submitting apps to the App Store.

3.2 BETA TESTING

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.

3.3 SUPPORTING LEGACY CODE

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:

CI for web CI for mobile

Functional tests require


Functional tests do not the use of an
Testing
require extra action. emulator/simulator or a
physical device.

Submit to store for


Deploy to live instantly, approval, may need
Deployment
no code signing uploading of certificates
to CI.

Deploy to staging and Distribute build via email


Beta Testing
invite users. or 3rd party.

N/A: newest version Use CI to keep track of


Legacy Version
instantly available for binaries versions for
Support
all. reference.

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

4 TOP MOBILE CONTINUOUS INTEGRATION TOOLS

Mobile devices have changed the software development and consumption


ecosystem in the last few years. Usage of mobile devices grows by the year
and it's no wonder that we see overcrowded mobile application
marketplaces.

Software development companies often feel lucky if their application reaches


the top of the marketplace lists. Or they need to invest substantial funds into
marketing to achieve the same.

So, what can a software development company that specializes in mobile


apps do to improve their chances in the global markets?

Well, the answer to that is surprisingly simple and the big software
development companies are already doing that for years.

It is continuous integration and continuous delivery.

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.

So let's check out the Top Mobile Continuous Integration Tools:

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.

If you opt-in to use Nevercode.io you get:

 Automatic configuration and setup of iOS, Android, Cordova, Ionic &


React Native projects
 Test automation with Firebase/ Amazon Device Farm and test
parallelization
 Automatic publishing to various platforms including Google Play, iTunes
Connect, HockeyApp, Crashlytics, TestFairy
 Comprehensive analytics
 Concurrent builds
 Integration with Slack, HipChat and other communication channels

30
The Definitive Guide To Continuous Integration

 Encryption of data
 First class support

Nevercode.io offers a 14-day trial, and three pricing plans to


their customers and they are pretty flexible, so you can choose the one most
suitable for your team. Each plan includes unlimited team members support,
but the difference lies in build parallelization and live support and even
training.

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.

4.2 VISUAL STUDIO APP CENTER

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

What you get with Fastlane:

 Around 170 integrations with other services


 100% open source project under the MIT license
 The on-premises solution, so you know where your data is, no need to
worry about data security (except your own heh)
 Integration with all major CI tools
 Support for iOS, Mac, and Android apps
 Unlimited customization possibilities
 Deployment from anywhere

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.

Bitrise.io offers a few different ways of configuring your mobile


applications. You can use a workflow editor to create your build process,
customize it to your will with the usage of .yml files or by using the Bitrise
CLI. Bitrise CLI is an open source project and you can fork it to mod it
for your need or make a pull request if you think you can add a new feature
to it.

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

By using Bitrise.io you get:

 A lot of different integrations


 Support for: iOS, Android, Cordova, Xamarin, MacOS, React Native and
Ionic
 Three different ways to configure and build your applications
 Excellent documentation and blog pages
 A community engaging environment by using the Open Source projects
 Engineering support
 Less coffee/month as a service (there is a lot more of those)

Bitrise.io offers three pricing plans: Hobby, Team, and Organization


(Standard and Elite), so they are pretty flexible with their plans. In addition
to 14-day trial period, the Hobby plan is free but very limiting. Team and
Organization plans are much more serious and include unlimited
members/builds per month, but are priced by concurrent builds.

Verdict: Another great tool, focusing on integration flexibility, community


engagement and offers several different ways to configure your projects

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

An ambiguous message, that doesn't tell you what to do next.

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.

Verdict: We couldn't test buddybuild properly or learn more about what's


going to happen with it. The overall experience with the tool left us with a
bad taste in our mouth. We hope that sometime in the near future, the
buddybuild team will know more/say more about the service status. You
don't have a choice but to avoid this tool for now.

4.6 STILL NOT SURE IF YOU SHOULD USE A MOBILE CI TOOL?

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

We've gone through a few of the mobile continuous integration tools


available on the market. The awareness about these tools is still not up to
the desired level so we hope this will help you understand the value and the
importance of using a CI tool for your next mobile project.

39

You might also like