0% found this document useful (0 votes)
91 views22 pages

Integrating Appflow With Your CI - CD Platform

The document discusses integrating Ionic's Appflow mobile continuous integration and delivery (CI/CD) platform with existing CI/CD systems. Appflow can handle specialized mobile tasks that most CI/CD tools cannot, like building native apps, running tests, and deploying updates to app stores. The document outlines how users can use Appflow's features for live updates, native builds, and app publishing through a CLI within their current CI/CD workflows. This allows teams to benefit from Appflow while keeping their existing CI/CD processes.

Uploaded by

shepard0liu
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)
91 views22 pages

Integrating Appflow With Your CI - CD Platform

The document discusses integrating Ionic's Appflow mobile continuous integration and delivery (CI/CD) platform with existing CI/CD systems. Appflow can handle specialized mobile tasks that most CI/CD tools cannot, like building native apps, running tests, and deploying updates to app stores. The document outlines how users can use Appflow's features for live updates, native builds, and app publishing through a CLI within their current CI/CD workflows. This allows teams to benefit from Appflow while keeping their existing CI/CD processes.

Uploaded by

shepard0liu
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/ 22

white paper

Integrating
Appflow with
your CI/CD
Platform
white paper

The Emergence
of Continuous
Integration & Delivery
Continuous integration and delivery (CI/CD) is one of the fastest growing sectors of the
developer market. It has transformed the way developers build and ship software.

CI/CD enables teams to continuously test and integrate their apps—instead of performing
these steps all at once before shipping— then automate the delivery of those apps. A
staple in the backend—and more recently frontend—ecosystems, CI/CD services help
developers perform a set of common tasks on every commit to their app, including:

Running builds for every commit pushed to a git repo

Running test suites, tracking failing and succeeding tests

Performing webhooks and other actions after builds

Launching or deploying apps to hosting destinations after successful builds

These tasks need to be performed on nearly every type of software application, whether
a backend, frontend, or mobile app. However, as we’ll explain in the sections below,
completing these tasks in a mobile project is easier said than done.

2 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

The Challenges
of Mobile CI/CD
For teams building and deploying apps to various app stores,
a mobile CI/CD solution is critical. As the CI/CD pipeline has
many steps and continuously runs throughout the development
cycle, its inherent complexity can cause countless problems. It
continues to be a huge hassle for most development teams.

Even with the prevalence of general purpose CI/CD tools like GitLab and CircleCI, most
aren’t optimized for mobile, and many still require advanced DevOps expertise. The
average mobile or web developer doesn’t have the expertise needed to master DevOps
and mobile CI/CD. As a result, nearly a quarter of developers aren’t using any type of
DevOps solution and it shows in their sporadic release cadence.

According to Ionic’s “The State of Enterprise Mobile App Development” research, 59% of
teams without a CI/CD solution release software less than once per month, and 17% will
release less than once per quarter.

DevOps and CI/CD tools can have an enormous impact when it comes to accelerating
the pace and frequency of software delivery. These strategies and tools help companies
streamline software development, testing, and deployment which increases the frequency
of software launches and app updates. CI/CD closes the delivery gap for mobile apps in
the enterprise.

3 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Defining Mobile CI/CD


Mobile app development is extremely complicated.

Mobile apps require extensive native compilation, rigid operating system protocols,
rigorous code signing, frequently-updated SDKs and tooling, complex operating system
licensing, device testing, and app store submissions.

For a mobile CI/CD platform to perform at the highest level, it will need to include extra
features to cover mobile app development demands:

Managed build environments for iOS, Android, and mobile web apps (for teams
building Progressive Web Apps)

Managed servers and server infrastructure as a service for legal, licensed builds
on macOS and Linux

Per-platform tooling: Xcode for iOS, Android SDK for Android, etc.

Certificate and profile management for mobile code signing

Deployment of web assets for hybrid mobile and Progressive Web Apps

Multiple deployment channels to enable easy development, beta, and production


tracks

Automatic submission to Apple App Store and Google Play Store

Frequent security patches and upgrades for safe builds on the latest Apple and
Google approved tools and SDKs

These features are specialized mobile tasks that most traditional CI/CD services do not
handle, so mobile teams will need mobile-specific CI/CD services and infrastructures to
meet their development goals.

4 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Appflow: Ionic’s Mobile


DevOps Platform
Appflow handles the entire mobile app delivery process from
building a native binary to publishing on the app stores and
updating apps over time.

Development teams can focus completely on the unique features of their app and
outsource the complicated app delivery process to Appflow. As a mobile DevOps
platform, Appflow powers mobile CI/CD at companies like Burger King, AAA, BCBS, and
more.

The following tasks—necessary to build and release apps—are not available in general
purpose CI/CD tools. Appflow fills in the gaps left by these general purpose CI/CD
systems. It is built to support these tasks and more:

Setting up consistent, repeatable mobile build environments so apps can be built


on every commit, using predictable dev tools, a blank slate, and operating systems

Building app binaries and artifacts for iOS, Android, and web

Running tests and other scripts on every commit to ensure apps stay working

Connecting to existing GitHub, Gitlab, Bitbucket and other repos, to perform


builds on every commit

Releasing working updates to users in real-time (for web updates), or to the app
stores (for binary updates)

Managing different versions of apps between testers, stakeholders, and


production users

5 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

CircleCI, GitHub, and other generic CI/CD build services, merely provide build servers:
a way to trigger builds and hooks for sending those builds elsewhere. But they do not
provide the tools or pipeline for mobile-specific builds, handle the deployment of your
app, or manage build environments.

Below is a look at the different approaches and how they compare:

Generic CI/CD Tools Ionic’s Appflow

Run actions on each build Run actions on each build Real-time app updates

Run builds/tests on Run builds/tests on In-app update


commits commits functionality

Connect to Code Repo App versions/deploy


Connect to Code Repo channels

App Store submission Native app binary builds

In theory, teams could build their own Appflow-style pipeline on another generic CI/
CD platform like CircleCI or GitHub Actions, but that would require developers to
orchestrate and keep updated a very complex chain of tools, operating systems, build
environments, app store submission features, remote app deployments, and more.
This would require a full team of engineers, with a different skill set than the typical
development team, to build the entire process and manage new mobile and desktop
operating systems released each year.

But what if your company already invested in traditional CI/CD tools? Can you still
integrate the benefits of Appflow in your existing system? Yes, you can.

6 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Creating a superpowered mobile


pipeline with your own CI/CD platform
and Ionic Appflow

If your organization already uses a CI/CD platform (like Azure


DevOps, GitLab CI/CD, GitHub Actions, Jenkins, Travis, or
CircleCI), you can continue to utilize that system for all of your
DevOps orchestration while still receiving all of the benefits of
Appflow’s features.

Your DevOps, QA, and development teams can continue to


collaborate using their existing processes while reducing the
management burden of a cross platform mobile CI/CD setup.

We’ve found that large organizations—with or without existing


DevOps teams—can unlock true iteration and save countless
headaches and hundreds of maintenance and development
hours per year by adopting Appflow in this way.

7 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

The entire Appflow suite at your


fingertips, in a matter of minutes.
With our simple Cloud CLI (command line interface), you can adopt Appflow in your
existing CI/CD system in a matter of minutes and begin implementing Live Updates,
Native Builds, and App Publishing—three features of the Appflow product.

By the end of this guide you’ll understand why and how to adopt one or more Appflow
features into your own CI/CD pipelines. We’ll begin by breaking down each Appflow
feature into more detail.

Achieve true mobile continuous delivery by updating your


app in real time to improve user experience and protect your
bottom line with Live Updates.
live updates

Create native app binaries in the cloud to get from code to


app store with no platform dependencies or complicated
build steps.
native builds

Automate the final mile and send iOS and Android binaries
directly to TestFlight, iOS App Store, Google Play, and Google
app store Play Beta for testing or production with App Store Publishing.
pub lishing

8 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Live Updates: Update your app in real time to improve


user experience and protect your bottom line.
Unlock the superpower of immediate deployments. Ship live app updates,
critical bug fixes, content changes, beta features, and more as soon as
they’re built.

This feature is unique to Web Native applications and allows your team to
send live code changes directly to users and testers without submitting new
native updates to the app stores.

Developers can make changes to


JavaScript, HTML, CSS, images, and
other web files and these changes are
fully compliant with Apple and Android
requirements.

Live Updates works seamlessly in the


background, checking for the latest app
updates and automatically upgrading to
newer versions. Unless there’s a change
to the native code, no user action is
required to keep your apps updated.

9 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Why use Live Updates in your own CI/CD platform?

Provide better user experience and protect your bottom line

Ship experience-changing improvements to your users without


annoying, interrupting, and delayed native updates. Protect your
bottom line by launching bug fixes the moment they’re ready, and not
a minute later.

True continuous delivery is only possible with Live Updates

Live Updates is a unique feature of Ionic’s Web Native ecosystem,


and isn’t available on other technology stacks. Give yourself an edge
above slow native app updates by launching improvements and fixes
in minutes, not days or weeks.

Half a decade of end-user centric improvements

The Live Updates service has been used by hundreds of Ionic’s


customers for over 6 years, and has an entire team of dedicated
engineers working on improving update speed, managing update
security, and adding new features every day.

10
white paper

Live Updates in Practice


Let’s take a look at a realistic scenario that a dev team could run into.

One morning, disaster strikes: customers start calling in to report that they can no longer
log into your company’s iOS and Android apps. Unfortunately, it’s determined that a bug
was accidentally shipped to production the day prior.

The dev team jumps on the issue and has it fixed within the hour. However, the company
can’t afford to wait several days for a new app store release to be approved, since the
company is losing money every hour that users can’t log in. Turning to Appflow’s Live
Updates feature, they get to work deploying the fix.

step Prepare a Fix

1 The web dev team commits the fix to the “main” branch, triggering their CI/CD pipeline.
As part of this: an Appflow web build is started:

$ ionic-cloud build web --app-id=<APPFLOW APP ID> --commit=<GIT COMMIT SHA>

During the build process, Appflow creates a fresh build environment, then checks out the
app project code. While the production minified web build is produced, Appflow pipes
back the command line build output from that build directly to your CI/CD server as if it’s
running on that machine. Once the build is complete, Appflow provides a zip file of your
web build that can be saved to your CI/CD system’s artifact storage for future auditing.

step Verify a Fix

2 Next, the newly completed build is deployed to a “QA” Live Updates Channel
(--destination=”QA”) for your QA team to test it on their iOS and Android devices:

$ ionic-cloud deploy web --app-id=123 --build-id=456 --destination=”QA”

As soon as they open the app on their devices, the Live Update is downloaded and applied
immediately, so the QA team can immediately verify that the issue has indeed been fixed.

11 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

step
Deploy the Fix

3 After the QA team verifies the fix, the Release Manager in charge of the release process
can continue the pipeline, which will trigger a production deployment. Another Appflow
deployment occurs, this time assigning the web build to a “Production” Live Updates
Channel (--destination=”Production”):

$ ionic-cloud deploy web --app-id=123 --build-id=456


--destination=”Production”

step Users Receive the Update

4 The updated software is immediately sent to your users without having to update their
native binaries and users can log in again.

PR opened
on main
branch

Build a Live Update Other CI/CD activities


$ ionic-cloud build web

Deploy Live Update


$ ionic-cloud deploy web

YOUR CI/CD PROVIDER

User

MOBILE APP
OP
EN
S

New Live Update


Available?

YES

Retrieve & Apply Live


Update

12 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Native Builds: Generate iOS and Android apps


without running, managing, and updating Mac
infrastructure.
Native Builds makes your iOS and Android binaries from scratch with every
upload. Reduce configuration, troubleshooting, and collaboration time by
building with your code as the source of truth, on fresh hardware, every time
you make a modification.

Native Builds offers over a dozen build stacks running on Mac and Linux
hardware, giving you greater control over your iOS and Android cloud
build environments while unlocking better native build stability and easier
troubleshooting.

No need to maintain your own build


infrastructure—Native Builds takes
care of it for you.

Native Builds even ports the entire


build output directly to your CI/CD
server so it acts like it’s running on
your own hardware.

13 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Why use Native Builds in your own CI/CD platform?

No need to build & maintain your own Mac infrastructure

iOS binaries are required to be built on Mac hardware, which


introduces a huge complexity and amount of work for companies who
don’t have on-prem Mac infrastructure. Appflow provides managed
Macs out of the box that we update for you, with no Mac hardware
required on your end.

Ensure that each and every build is stable

Building binaries on developer machines introduces a large amount


of variation in each build of your app, with each variation being an
opportunity for unknown bugs. By utilizing Appflow’s build servers,
every build starts with a clean server and utilizes your code as the
source of truth.

Seamless integration with your CI/CD platform, logs and all

Configuring different build types for separate environments and


certificates can be tricky. With just one CLI command, your CI/CD
platform can build iOS and Android apps with a variety of options,
including development, enterprise, or app store builds, various sets of
development tooling, and more.

14 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Native Builds in Practice


Here is a common use case for Native Builds.

After a new version of the web application has been built, the development team would
like to build the iOS and Android versions as well so the QA team can test all three
versions together. Currently, a member of the dev team builds and uploads the mobile
apps on their machine. However, this takes time away from the development of new
features or addressing customer issues. Turning to Appflow’s Native Builds feature, they
begin working to automate the mobile build process.

PR against
Main Branch

Web Pipeline Android Pipeline iOS Pipeline

step Upload security certificates

1 Rather than store the iOS and Android certificates on a single engineer’s machine, the
team uploads them to Appflow. They’ll only need to do this once per year (the average
expiration window for certs), which not only frees up their time, but also keeps the
certificates secure and ensures they are always available when native builds need to be
performed.

step
Add Native Builds to Pipeline

2 Next, the team needs to add a native build step to their existing web app build pipeline:

$ ionic-cloud build <ios|android> development --app-id=<APPFLOW APP ID>--commit=<GIT


COMMIT SHA> --signing-cert=”QA Signing Certificate”

15 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

During the build process, Appflow creates a fresh build environment, then checks out
the app project code. While the native builds are produced, Appflow pipes back the
command line build output from that build directly to your CI/CD server as if it’s running
on that machine. Once the build is complete, Appflow provides the IPA and APK files
that can be saved to your CI/CD system’s artifact storage for future auditing as well as
uploading to the app stores.

step
Test and Deploy

3 A new message appears in the company chat app informing the QA team that a new
version of the mobile app is available for testing. After the QA team performs their tests
and approves the build, the DevOps team uploads the native binaries to each respective
app store then submits them to Apple and Google for review.

PR opened
on main
branch

Web Pipeline Android Pipeline iOS Pipeline

YOUR CI/CD
PROVIDER
Build Android App Build iOS App
Build Web App
$ ionic-cloud build $ ionic-cloud build
(Web Tool)
android iOS

Notify QA Team Notify QA Team


Deploy Web App
in Chat in Chat

Install Android
Access Web App Install iOS App
App

16 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

App Store Publishing: Ship live app updates,


critical bug fixes, content changes, beta features,
and more at the speed of development.
App Store Publishing allows you to automate the entire app delivery and
release process: from building a native binary to publishing on the app stores
and updating apps over time.

Just input a few basic data points, and we’ll take care of the rest. No
Mac hardware is required, since iOS apps are built in our secure cloud
environment.

When a new app version is checked in, the iOS and Android binaries are sent
directly to TestFlight, the iOS App Store, Google Play, and Google Play Beta
for testing or production.

17 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Why use App Store Publishing in your own CI/CD


platform?

Automate the entire app release process

Remove the most tedious and challenging steps of app store


publishing, including certificate and configuration profile
management, native binary builds, and various deployment
destinations. When a new version is checked in, a sequence of events
automatically triggers. Once approved by the app store, the new app
store submission is deployed.

Get builds into stakeholders, customers, and QA hands faster

Increase delivery velocity in order to achieve rapid feedback


mechanisms. Faster feedback means happier customers.

Seamless integration with your CI/CD platform, logs and all

Fit into your team’s existing and custom CI/CD processes. Send a
test build of the app directly to the QA team’s devices so they can
view and test the new version seamlessly. Once approved, send a
production build directly to the app stores.

18 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

App Store Publishing in Practice


The following is another common use case for App Store Publishing.

The DevOps team is initially satisfied with their new Native Builds addition to the CI/
CD pipeline, but quickly realize there are more manual tasks that could be automated.
Specifically, they’d rather send a test build of the app directly to the QA team’s devices
so they can view and test the new version seamlessly. Then, once it’s approved, send a
production build directly to the app stores.

step Send a QA build directly to TestFlight

1 By leveraging Appflow’s App Store Publishing feature, the DevOps team sends the QA
build of the native app to TestFlight, Apple’s online service for over-the-air installation and
testing of mobile applications.

$ ionic-cloud deploy ios --app-id AppIdEx123abc --build-id $(iosbuildid) --destination


“TestFlight” --token $(IONIC_TOKEN)

By setting the destination to “TestFlight”, the native build is sent to Apple’s servers, and
the QA team is notified via push notification that the app is available for testing.

step
Build and Deploy a production build to the app stores

2 Once the QA team has verified the QA build, the next step in the CI/CD process is to build
a production native binary. This time, the app-store build type is specified along with the
Production signing certificate:

$ ionic-cloud build ios app-store --app-id=<APPFLOW APP ID> --commit=<GIT COMMIT SHA>
--signing-cert=”Production Signing Certificate”

19 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

After a successful build, the build is sent to the app stores by specifying the destination as
“AppStore”:

$ ionic-cloud deploy ios --app-id AppIdEx123abc --build-id $(iosbuildid) --destination


“AppStore” --token $(IONIC_TOKEN)

With both the native Android and iOS apps uploaded to the App Store, the DevOps team
adds release notes, then submits the builds for review. Shortly after, the new version is live
and in users’ hands.

PR opened
on main
branch

Android Pipeline iOS Pipeline

YOUR CI/CD
PROVIDER Build a Android App Build a iOS App
$ ionic-cloud build android $ ionic-cloud build iOS

Deploy to Google Play Beta Deploy to TestFlight


$ ionic-cloud deploy android $ ionic-cloud deploy iOS

GOOGLE PLAY TESTFLIGHT


BETA
Process new app version Process new app version
then notify testers then notify testers

Install Android App Install iOS App

20 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

Bottom Line
Enhance your existing CI/CD pipeline with Appflow—Ionic’s
mobile DevOps platform. With Live Updates, Native Builds, and
App Store Publishing, your team will save development time
and cost to build, deploy, and update mobile apps. Focus on
developing mission-critical apps for your customers, and we’ll
take care of the complicated mobile CI/CD automation.

Start using Appflow inside your own CI/CD platform by visiting


ionic.io/appflow.

Common Q&A / Security Questions


“What’s the architecture of the Appflow system?”

Appflow’s services run on the Amazon Web Services (AWS) platform in a fully
managed virtual private cloud (VPC).

21 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper

“Do I have to use the entire platform?”

No. You can use Live Updates, Native Builds, or App Store Publishing features individually,
or mix and match.

“Do I have to send/upload our company’s source code to Appflow?”


Yes, Appflow has temporary access to your source code while a web or native build is
performed. However, code is stored on a temporary cloud runner that is destroyed after
each build. We never keep a copy of your source code.

“Do you work with my on-premise Git repository?”


We support BitBucket Server, Azure DevOps, and GitLab Self-Managed. For more detailed
information, please reach out to us about your requirements.

22 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.

You might also like