A phased release, or rollout, is a process where an app update is released to customers in stages instead of all at once. This is useful in several ways:
Gauge how customers respond to an app update and respond accordingly
Backend processes or infrastructure can be scaled intelligently as adoption ramps up
If something very unexpected happens, the release can be paused for triage leaving only X% of customers affected instead of everyone
While this feature is both available in the iOS and Android world, it’s not done automatically for the Androids…
How the App Store (iOS) phased releases work?
When you enable a phased release in the App Store your app update is gradually released to customers with automatic updates turned on.
Day
Release Percentage
Day 1
1%
Day 2
2%
Day 3
5%
Day 4
10%
Day 5
20%
Day 6
50%
Day 7
100%
This is handled by Apple automactically, meaning that you don’t have to login and update them manually every day, and that’s exactly the case for the Android Store. In order to address this problem we are going to use the following:
#1 Jenkins or whatever CI you’re using, we need something that can guarantee us that the script we are going to write is going to run every day (cronjob will do the same thing)
#2 A simple ruby script that will take care of checking what is the current stage of the release and updating it to the next one accordingly
Here’s the ruby script I wrote in order to achieve #2, I am going to comment most of the lines so it’s obvious what’s happening
Once you have this script you can run it every day in your CI or a cronjob, using the following