Jenkins is the way to achieve greater flexibility in projects & faster deployments

Android CI/CD Final

Submitted By Jenkins User Aman Makwana
DevOps developer shares his lessons learned using Jenkins to enhance their testing environment for his mobile and gaming app company.
Industries: Android ecommerce app
Programming Languages: Java, Node.js, Python
Version Control Systems: Bitbucket Server, GitLab
Community Support: Jenkins.io websites & blogs, Networking at Jenkins event

For iterative mobile app development and testing, the Jenkins Diawi plugin did the trick.

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.

"Jenkins simplified development processes and the build sharing platform for different teams."
image— Aman Makwana, DevOps

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! 

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:

  1. Upload the iOS or Android application.

  2. Send the link to your testers, clients, friends or even use it yourself.

  3. Open the link in the browser on the device and click on install.

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:

  • standardized testing for many solutions 

  • simplified development processes for different teams 

  • simplified processes for sharing builds processes with the teams

  • flexibility and ease of use for everybody