User:BSitzmann (WMF)/WikipediaAndroidBuilds

This is our makeshift CI system using Toollabs.  . The initial discussion and reasons for building our own solution are in this Etherpad.

The builds run on tools.wmflabs.org. Every 30 minutes it checks if there are new changes merged to the master branch.

The web site will be at http://tools.wmflabs.org/wikipedia-android-builds/.

Tasks
1. Create a tool account

2. Setup android SDK for that tool account manually

3. Write a small script that does:

1. Does a git pull on the android repo, checks if there's new commits on master

2. If there is, makes a build and notifies people via channels (IRC?)

3. Makes the new build available via http

TODO: need build to run prepare-release.py to generate a new package for master builds; later also one for ci or custom builds (not merged yet)

4. Run script from (3) in a cron every 30minutes
 * Started but needs improvements:
 * Still has an issue with: /data/project/wikipedia-android-builds/bin/check_repo.bash: line 19: jsub: command not found
 * Currently forcing a new build (for better debugging) in every check

(see bin/check_repo.bash, and comment out the  echo "forcing build" >> ${INCOMING}  line to remove the force) 5. Write a small web service that gives metadata about the latest apk build (url, timestamp, commit sha)
 * Make cron stop sending emails. Only send an email after the buid fails, maybe for now  while we don't have notifications, also when it succeeds).

6. Write a small android app that hits webservice from (5), checks for updates and offers to download apk for user  < a bit overkill? I think that could come later. I would do (7) before that (It'll check for updates, which I think is super important) Maybe a nice volunteer/hackathon project?

7. Write a small 'status' page that lets people download both the latest APK and also the wrapper app from (6)