Continuous Integration Google Play Store Internal App Sharing In Tokopedia

Erry Suprayogi
Dec 14, 2020 · 6 min read
Automated Deployment Tokopedia

The Background of this story

Since Google introduced the dynamic delivery with app bundle (aab) in Google I/O 2018, the Tokopedia Android team becomes enthusiast with researching the possibility to implement this dynamic feature module because our app size is increasing from time to time along with the growth of the application feature, we need to tackle this issue.

Google Internal App Sharing

With internal app sharing, we can quickly share an app bundle or APK with the internal team and testers by uploading an app bundle or APK on the internal app sharing upload page and generating a link. When sharing the app this way, we can allow anyone with a shared link to download and test the dynamic features.

Continuous Integration

Based on the Wikipedia page. In software engineering, continuous integration is the practice of merging all developers’ working copies to shared mainline several times a day. That means continuous integration (CI) is an integration of all or several parts of iterative development into a pipeline process and can be automated with CI software.

Overview The Architecture

Here is the overview of the architecture process, we Android Engineers just need to trigger the build button and Jenkins will do the job until the process is completed.

Internal App Sharing Integration Workflow

Prepare The Integration

Google provides an API for internal app sharing. You can explore the API at the official documentation. They offer Java or Python client libraries. To integrate the internal app sharing into Jenkins CI, we had to go through HTTP and create the Google service account.

Bash script to generate JWT token
Bash script for uploading to Internal App Sharing
Uploading the bundle file with Terminal
Jenkins > Credentials > System > Add Credentials
Add Jenkins credentials
sh '(./internal-app-sharing.sh $PLAYSTORE_KEYFILE $AAB_PATH $PACKAGE_NAME)'
Thread message in Slack channel

Conclusion

Now we can automate and integrate the internal app sharing into our internal development process, the benefits that we can get are.

  • Improve productivity. Since Android engineers are not required to upload manually to Play Store and wait for the process, they have plenty of time to do something else. They can do tech-improvement, backlog stories, or even do unit tests for features!

Tokopedia Engineering

Story from people who build Tokopedia

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store