Cyburst.io

Any fool can know. The point is to understand

GitLab CI/CD – Configuring .gitlab-ci.yml file Android(Part-4)

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.

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

Pipeline status
Pipeline status

Click on this pipeline will navigate you to the page where you can find running jobs

Pipeline is running
Pipeline is running

Click on the job will navigate you to running docker container

GitLab CI/CD Process
GitLab CI/CD Process

Now wait for the process to finish the job and you will get a success or error message on the job finished

Job success
Job success
Find the Release build on the right side of GitLab console
Find the Release build on the right side of the GitLab console

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

Cyburst Logo

Don’t miss the latest posts!

We don’t spam! Read our privacy policy for more info.

Rutvik Bhatt

Experienced mobile app developer with a demonstrated history of working in the information technology and services industry. Skilled in Android, React-Native, Flutter, Dialog Flow, Firebase, Cloud Functions. Focused in mobile technologies and software development.

5 thoughts on “GitLab CI/CD – Configuring .gitlab-ci.yml file Android(Part-4)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top