Skip to content

Deploying releases of Sense for Android

Simon Chen edited this page Jun 22, 2016 · 8 revisions

Prerequisites

  • The Hello-Android-Internal and Hello-Android-Release key stores
  • The shared email and password used to sign into the Google Play Developer Console
  • The deploy script must be set up. See the Deploy Script Wiki page for more info.

Prepping for release candidate deploys

After all work has been merged into the develop, you will need to create a pull request to merge the commits from develop into the master branch. The master branch is write-protected, so you can only do this through the GitHub pull request interface.

Deploying

Once master contains all of the commits you intend to deploy, check it out in your local repository and pull any remote changes.

Deploying to HockeyApp

Internal QA builds, as well as the release candidate archive are both kept in HockeyApp. Uploading to HockeyApp is as simple as invoking the deploy script included in the suripu-android repository. A typical invocation will look like:

# in suripu-android/
./scripts/deploy -s1.3.0rc1 alpha store

Let's break down the optional arguments passed to deploy:

  • -k causes the deploy script to clean the build directory before assembling the APKs. This is generally a good idea, as retrolambda and dagger can fall out of sync with the source code in the project when you switch branches. Important: Cleaning is true by default to avoid deploying dirty builds to alpha or store.

  • -s causes the deploy script to create a new git tag, and push it to the remote repository. In this case, it will create the tag 1.3.0rc1. The format used for tags is typically major.minor.bugfix.rc#. Important: It's common to have more than one release candidate, so it's a good idea to number them in your tags.

  • alpha and store cause the deploy script to separately create debug, and release builds. These builds will be uploaded to their respective apps on HockeyApp. Important: store builds can only be created on the master branch to prevent accidental deploys of unfinished work.

  • --dry-run will clean the build and perform checks but not attempt to upload build to HockeyApp.


After each build is completed, the HockeyApp page for the unreleased build will be opened in your web browser of choice. Write up release notes based on the tasks completed in your Current tab in Pivotal Tracker.

When you release a build through HockeyApp, you should only notify the people who you need to verify bug fixes and features of the build. This means you'll usually only notify the mobile and product leads, any designers that worked on the build, and whoever is going to QA the build. Important: Never notify for a store build, store builds are only available for archival purposes.

Deploying to the Play Store

Deploying betas to the Play Store is currently not automated. To begin, sign into the Play Store developer console using the credentials shared by all mobile developers at Hello. After logging in, you will need to navigate to the beta testing APK tab:

  • Select the Sense app in the All Applications listing
  • Select the APK option in the side bar
  • Select the BETA TESTING tab
  • Click the Upload new APK to Beta button below the tabs

Drag the app-release.apk file that was highlighted by the deploy script into the Play Store upload modal.

Once the APK is uploaded, enter the release notes you've received from the product lead. If the release notes are too long, remove bug fix bullet items until the release notes fit.

Double check the release notes, and press the Publish now to Beta button.

Next steps

As a courtesy to your team mates, you should leave a message in the #mobile channel that you've released a new release candidate for testing.

Before you can push your release candidate to the public, QA, design, and product need to sign off on your build.

Releasing to the public

Once your build has been approved by everyone, you can promote the beta on the Play Store to production. You will need to log into the Play Store developer console, and navigate to the beta tab again:

  • Select the Sense app in the All Applications listing
  • Select the APK option in the side bar
  • Select the BETA TESTING tab
  • Click the Upload new APK to Beta button below the tabs

Find the current live beta version at the top of the version listing below the current APK statistics. Press the Promote to Prod button. On the next tab, select the Publish as staged rollout option (we should always do this unless there's reason not to). Congratulations, you've released a new version of the Sense for Android app.

Be sure to mention in the #mobile channel that a new version of Sense for Android is available!