How to upload an APK from Jenkins/Hudson to Play Store? How to upload an APK from Jenkins/Hudson to Play Store? jenkins jenkins

How to upload an APK from Jenkins/Hudson to Play Store?


I can talk only for Google's Play Store. There is a way, but be warned, it isn't beautiful, you have to code your solution. I am right now writing a Bachelor Thesis to solve this problem - "Continuous Delivery for Android Applications". My solution is mine, this means I don't raise a claim to have the perfect solution, but I can say it is quite working prototype.

I found out the following:

  • The first Solution is none. Google offers an Play Store API, but it lacks to upload stuff. Seems that they were already thinking about to make such an API, but it only offers In-App billing control

  • The 2nd solution is to use Apache HttpComponents Library, which lets you implement your own Client for the Google Play Developer Console, but HttpClient lacks a JavaScript Interpreter... Several ways to implement or add one. But of course, not the easiest way.

  • The 3rd Solution I am working on, is to use Selenium Web Browser Automation Framework. So basically I create PageObjects from those Play Store Pages and dialogues. After that you can create some Factory to maintain "pathes" of controlling these PageObjects.

Using them you have two options as far as I can see, for instance the WebDriver Objects which uses an "invisible" browser process like FF or Chrome and another I use is ChromeDriver which uses a visible Browser process, to perform the User actions. And don't forget to have Exception Handlers, which scans the Webpage for appearing errors, while in use.

There are a lot of pitfalls, due to possible changes in the Design from Google, which lets your Software break. But there are also some ways to handle that. =) And create an XML containing all valueable information about an app, which comes in handy, when continueing to the next step.

You can create a Maven Plugin. This you can load into your Continuous Integration Server. I hope I could help you a bit.


Since Google Play released the upload API, a plugin has been made:

https://wiki.jenkins-ci.org/pages/viewpage.action?pageId=73533143

I haven't tried it yet, but looks like it's exactly what we were looking for.

There are other plugins that claim to do the same (thanks @mdt)