Note : This article is the 4th and last part of the Gitlab CI/CD - Android" series. It is direct follow up to Part-1, 2 & 3 , so I highly recommend you read that first before starting.
As a developer, our main aim is to automate almost every process from testing to deploying. This article series is all about the concept & setup of CI(Continuous Integration) & CD(Continuous Deployment) for Android.
Finally, we reached the last part of this series Android setup for GitLab CI/CD.
Setup .gitlab-ci.yml file
.gitlab-ci.yml
is the basic config file to ensure your Android app compiles and passes unit and functional tests.
Let’s understand the important part of .gitbal-ci.yml
file that dynamically creates files from the CI/CD Variable.
Remember the step in part 3 that we set play{} object in app/build.gradle file with track, serviceAccountEmail & jsonFile.
Now here we create the directory PlayJson and create a new file play-store-key.json in it from CI/CD Variable PLAY_STORE_JSON that we set during setting up GitLab CI/CD Variable part.
here we set the Trigger of the pipeline when we push or merge code in the master branch. once we merge or push in the master branch you can see the pipeline is running in
Click on this pipeline will navigate you to the page where you can find running jobs
Click on the job will navigate you to running docker container
Now wait for the process to finish the job and you will get a success or error message on the job finished
Here our job is successfully done you can download the release APK from your GitLab repo /app/build/outputs/ or you can click on the browse button at the right bar of the window and you can also check your Google Play Console that the release build was uploaded and getting live in some time as per your setting track(‘production’, ‘alpha’, ‘beta’).
refer Setting up GitLab CI for Android Project to understand .gitlab-ci.yml
file in brief.
That’s all about GitLab CI/CD for the Android series. Hope you like the article, Hoping for your appreciation in the comment section and on my social media handles
I really like reading through a post that can make men and women think. Also, thank you for allowing me to comment!
Wonderful post! We will be linking to this great article on our site. Keep up the great writing
o great to find someone with some original thoughts on this topic.
Great post Thank you, look forward to the continuation. dubai tv live streaming
good!!!