Background: Everything seems difficult until it is done! I have been exploring Jenkins for a while now. When I started I didn't know that I would face difficulty in doing the basic setup of Jenkins for building an Android project. Fortunately, I was able to make my way out after toiling for almost a week. Though Jenkins is easy to set up, it is not that easy when used for building an Android project. I'm writing this to share some of the problems I encountered in this post to help you avoid any difficulty in the setup of Jenkins for any build projects you may have for Android apps.
Goals: To deploy every commit in a way which tests the code and then deploys it.
Solution & Results: Let us start with a brief introduction of Jenkins, according to CloudBees. Jenkins is an open source automation server. With Jenkins, organizations can accelerate the software development process by automating it. Jenkins manages and controls software delivery processes throughout the entire lifecycle, including build, document, test, package, stage, deployment, static code analysis and much more.
As this is a basic setup tutorial for Jenkins + Android, I'm not going to explain what Jenkins is and how to play around it or how to configure advanced setup for Android and other stuff! There are lots of YouTube videos and free courses out there on Jenkins! Go and check them out first if you don't know your way around Jenkins. This tutorial is only intended to demonstrate basic Jenkins setup for Android Projects!
Jenkins simplified development processes and the build sharing platform for different teams.
We wanted a way to improve our testing of the app in various development stages for our project team leads and other developers. So, I began exploring solutions to make it easier, and faster. I found a wonderful plugin in Jenkins -- the Diawi upload plugin -- to achieve my task.
So, what is Diawi ?
Diawi is a tool for developers to deploy development and in-house applications directly to the devices, with three simple steps:
It works for iOS and Android.
Using that tool when you go to configure your project, you have to add in the build stage with the Diawi Upload plugin and then your APK name. Then with every successful build, it will send you an email (like here's your app…) with a barcode scanner, which is downloadable, as well.
In general, we received a powerful, controllable CI/CD solution to share the builds across tests and give it to the teams. The solution is flexible in configuration and easy to use.
Jenkins offered us: