-
Notifications
You must be signed in to change notification settings - Fork 16
Deployments
Clone the repo. Have the Android SDK setup, follow the instructions in this section
Update the app/gradle.properties
with the correct release key info. See https://github.com/akvo/akvo-flow-mobile/blob/develop/app/gradle.properties.template for an example. Get all the fields from the vault, selecting the android tag.
Add gradle.properties
at the root of the project.
This is the content of my file and speeds up the builds by 50% from the default settings:
org.gradle.jvmargs=-Xmx2048m
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.caching=true
export FLOW_SERVER_CONFIG=FULL_PATH_TO/akvo-flow-server-config
export FLOW_S3_ACCESS_KEY=[get the AWS access key]
export FLOW_S3_SECRET_KEY=[get the AWS secret key]
You will find those keys in the vault.
cd akvo-flow-mobile
git checkout master
util/upload-apk/script/flow-releases.sh akvoflow-xx
The instance param can also be omitted and in this case the script will deploy to all instances or you can pass a list of instances in the form "akvoflow-xx akvoflow-yy". For more info see README.
Create an issue for release notes, then follow these instructions to add release note to the release branch. Commit and Push.
Tag the release with your GPG key. Here is an example for linux:
git tag -s v2.5.2 -m "Akvo Flow app v2.5.2 - Haptic Hazel"
Push the tag
Merge with master with --no--ff
flag, then merge master into develop
Draft a release on github selecting the created tag and copying the release notes section
Release to all instances for exmaple version 2.5.2 with the date 06/08/2018:
util/upload-apk/script/flow-releases.sh |& tee /home/valeria/akvo-flow-mobile-deployment-2.5.2-06-08-2018.log
Once the deploy finishes, you need to check the log file for errors.
- Open the log file and count the number of "generating apk version"
- Count the number of "New APK version successfully stored in GAE for instance" if both numbers match, you are all set. Otherwise scan the file for "Error ". You may find for example "Error updating APK version in GAE for akvoflow-xx". Go to the instances log spreadsheet and make sure that instance is disabled. If not disabled, you need to retry deploying to that instance
util/upload-apk/script/flow-releases.sh akvoflow-xx
Repeat the same until all enabled instances are successfully deployed
Use this script: https://gist.github.com/valllllll2000/9b7430263dd63608ed3a47f5758674d5 setup INSTANCE to the instance name you want to deploy (ex: akvoflow-145) and setup the environment vars by getting the keys from the vault
About Akvo Flow app
Developer Guides
Tests