Integrating Appflow With Your CI - CD Platform
Integrating Appflow With Your CI - CD Platform
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:
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
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.
Deployment of web assets for hybrid mobile and Progressive Web Apps
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
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:
Building app binaries and artifacts for iOS, Android, and web
Running tests and other scripts on every commit to ensure apps stay working
Releasing working updates to users in real-time (for web updates), or to the app
stores (for binary updates)
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.
Run actions on each build Run actions on each build Real-time app updates
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
7 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper
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.
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
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.
9 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper
10
white paper
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.
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:
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.
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:
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”):
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
User
MOBILE APP
OP
EN
S
YES
12 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper
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.
13 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper
14 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.
white paper
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
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:
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
YOUR CI/CD
PROVIDER
Build Android App Build iOS App
Build Web App
$ ionic-cloud build $ ionic-cloud build
(Web Tool)
android iOS
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
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
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
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.
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.
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”:
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
YOUR CI/CD
PROVIDER Build a Android App Build a iOS App
$ ionic-cloud build android $ ionic-cloud build iOS
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.
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
No. You can use Live Updates, Native Builds, or App Store Publishing features individually,
or mix and match.
22 To start using Ionic’s cloud products inside your own CI/CD platform, visit ionic.io/appflow.