{"id":1138,"date":"2020-01-06T22:21:14","date_gmt":"2020-01-06T12:21:14","guid":{"rendered":"https:\/\/learntodroid.com\/?p=1138"},"modified":"2020-01-06T22:21:25","modified_gmt":"2020-01-06T12:21:25","slug":"save-time-automating-android-app-build-test-and-release-with-jenkins","status":"publish","type":"post","link":"http:\/\/10.0.0.14:32769\/save-time-automating-android-app-build-test-and-release-with-jenkins\/","title":{"rendered":"Save Time Automating Android App Build, Test and Release with Jenkins"},"content":{"rendered":"\n

As you build new features into your app that your users are craving you want to be able to release them to production as quickly as possible while maintaining a strong level of quality to keep your users satisfied.<\/p>\n\n\n\n

The process of releasing a new change to to your Android app via the Google Play Console is time consuming, but before you even get to that stage where you want to release a change to your app in production, you want to make sure your app has gone through sufficient testing.<\/p>\n\n\n\n

Software development practices such as Continuous Integration and Continuous Delivery will help you reduce cycle times for delivering new changes by introducing automation for building, testing and deploying your Android app.<\/p>\n\n\n\n

In this article I have included a tutorial using the well known Continuous Integration and Continuous Delivery software Jenkins, allowing you to automate the following steps to run sequentially, to be triggered manually or by a code change being committed in your code repository.<\/p>\n\n\n\n

  1. Build your Android app<\/li>
  2. Run unit tests<\/li>
  3. Sign your APK<\/li>
  4. Run instrumentation tests on devices hosted in the cloud using Firebase Test Lab<\/li>
  5. Distribute your app to testers using Firebase App Distribution<\/li>
  6. Then manually trigger a separate automated job responsible from deploying your signed APK into production through the Console Play Console <\/li><\/ol>\n\n\n\n

    Before going into the tutorial I will shared some more information on the what Continuous Integration and Continuous Delivery is all about and more on what Jenkins is and the capabilities and benefits it offers.<\/p>\n\n\n\n

    What is Continuous Integration and Continuous Delivery?<\/h2>\n\n\n\n

    Continuous Integration (CI) and Continuous Delivery (CD) are practices followed in software development to enable the frequent release of smaller incremental changes to software to production while still maintaining quality and reliability through the use of automation.<\/p>\n\n\n\n

    Continuous Integration encourages the development team to commit and merge code frequently to their shared code repository. Then use a shared build server to take the merged code from the code repository and build the software and run tests written by developers following a test driven development methodology. Then results of the build are available to all developers to review, allowing developers to remediate any failures to ensure quality standards are being met.<\/p>\n\n\n\n

    Continuous Deployment involves investing in automation tools to take the software built by the Continuous Integration build server and deploy the changes into the appropriate environment whether that be a developer environment, test environment or production environment.<\/p>\n\n\n\n

    What is Jenkins?<\/h2>\n\n\n\n

    Jenkins<\/a> is a popular (with 14.7k Stars in GitHub at the time of writing), open source, free to use automation server that enables continuous integration and continuous delivery.<\/p>\n\n\n\n

    Jenkins allows you to create jobs to automate the building, testing and deploying of your software.<\/p>\n\n\n\n

    Some other populare features of Jenkins include:<\/p>\n\n\n\n