Skip to content

Instantly share code, notes, and snippets.

@lucasfeijo
Last active January 7, 2021 23:13
Show Gist options
  • Save lucasfeijo/9d69ae9f2af4e32694e82a951c77e8e8 to your computer and use it in GitHub Desktop.
Save lucasfeijo/9d69ae9f2af4e32694e82a951c77e8e8 to your computer and use it in GitHub Desktop.
Postponing Builds

Postponing builds

Problem

Deploying to mobile isn't as transparent as web: every Connect update nags the user to install it. Continuous delivery like that doesn't offer us the possibility to let builds accumulate until a release, saving user's data and giving us time to rollback when problems arise.

Currently, with our new in-house MDM solution, we don't have a way to control which builds get deployed to Android devices, all builds are consumed by Connect mobile clients as soon as they are uploaded to Nitro and the client downloads them.

Solution

In order to postpone the deployment of a build, I propose the following approach.

The clients remain the same, consuming the /latest endpoint.

A column is added to the releases table:

should_release BOOLEAN DEFAULT FALSE

The endpoint code gets a new WHERE clause selecting only the latest build that has should_release=TRUE.

In order to control the value of should_release, we have two options:

  1. Label the PR on github as "should_release", that value is available while building, and can be sent as parameter while uploading the build to Nitro MDM.
  2. Have a page where you can view all builds and check it off for release, possibly integrate with Runway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment