What is CI/CD?

 This is a very common Senior Android Developer interview question. Interviewers usually want to know whether you understand the entire app delivery pipeline, not just Git or Fastlane.


What is CI/CD?

CI (Continuous Integration)

Developers frequently merge code into a shared repository. Every commit automatically:

  • Builds the project

  • Runs unit tests

  • Checks code quality

  • Detects issues early

CD (Continuous Delivery/Deployment)

After CI succeeds, the app is automatically:

  • Signed

  • Distributed to testers

  • Uploaded to the Play Store (or prepared for release)


Complete Android CI/CD Flow

Developer
      │
      ▼
Git Feature Branch
      │
      ▼
Pull Request
      │
      ▼
Code Review
      │
      ▼
Merge to develop/main
      │
      ▼
CI Server (GitHub Actions / Jenkins)
      │
      ├── Checkout Code
      ├── Gradle Build
      ├── Run Unit Tests
      ├── SonarQube Analysis
      ├── Lint
      ├── Build APK/AAB
      ├── APK Signing
      ├── Fastlane
      ├── Firebase App Distribution
      └── Play Store Deployment

Step 1: Git

Developers work on feature branches.

Example

main

develop

feature/login

feature/payment

bugfix/crash

Commands

git checkout -b feature/login
git add .
git commit -m "Added login screen"
git push

Step 2: Pull Request (PR)

Developer creates a Pull Request.

feature/login

↓

Pull Request

↓

Code Review

↓

Approve

↓

Merge

Reviewer checks:

  • Code quality

  • Architecture

  • Naming

  • Performance

  • Bugs


Step 3: CI Starts Automatically

Example:

GitHub Actions detects

Push

or

Merge

Pipeline starts automatically.


Step 4: Build

./gradlew assembleDebug

or

./gradlew bundleRelease

Checks

  • Compilation

  • Gradle errors

  • Dependency issues


Step 5: Unit Tests

./gradlew test

Example

@Test
fun additionTest() {

    assertEquals(5,2+3)
}

If any test fails

Pipeline Stops

No deployment.


Step 6: SonarQube

SonarQube checks

  • Code smells

  • Duplicate code

  • Bugs

  • Security issues

  • Test coverage

Example

Coverage

82%

If quality gate fails

Build Failed

Step 7: APK / AAB

Build release

./gradlew bundleRelease

Output

app-release.aab

or

app-release.apk

Step 8: APK Signing

Android apps must be signed.

Example

signingConfigs {

    release {

        storeFile file("keystore.jks")

        storePassword "*****"

        keyAlias "release"

        keyPassword "*****"
    }
}

Without signing

Cannot upload to Play Store

Step 9: Fastlane

Fastlane automates Android release tasks.

Example

fastlane beta

Can automatically

  • Increment version

  • Build app

  • Sign APK

  • Upload to Firebase

  • Upload to Play Store


Step 10: Firebase App Distribution

Distribute app to QA.

Developer

↓

Firebase

↓

QA Team

↓

Install APK

No Play Store required.


Step 11: Play Store

After QA approval

Internal Testing

↓

Closed Testing

↓

Production

Fastlane can upload automatically.


GitHub Actions Example

name: Android CI

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-java@v4

      - run: ./gradlew test

      - run: ./gradlew assembleRelease

Jenkins

Jenkins performs the same automation.

Git Push

↓

Jenkins

↓

Build

↓

Test

↓

Sign APK

↓

Deploy

Real Project Flow

Suppose you build a Payment feature.

Developer
      │
      ▼
Git feature/payment
      │
      ▼
Pull Request
      │
      ▼
Code Review
      │
      ▼
Merge to develop
      │
      ▼
GitHub Actions
      │
      ├── Gradle Build
      ├── Unit Tests
      ├── SonarQube
      ├── Build AAB
      ├── Sign
      ├── Fastlane
      └── Firebase Distribution
               │
               ▼
           QA Testing
               │
               ▼
         Production Approval
               │
               ▼
      Fastlane Uploads to Play Store

Common Interview Questions

Why CI/CD?

  • Faster releases

  • Automated testing

  • Consistent builds

  • Early bug detection

  • Reduced manual work


Why Fastlane?

Automates repetitive release tasks:

  • Version code update

  • Build

  • Sign

  • Upload to Firebase

  • Upload to Play Store


Why SonarQube?

Improves code quality by checking:

  • Bugs

  • Security vulnerabilities

  • Code smells

  • Coverage


Why APK Signing?

Android requires every release app to be digitally signed to verify its authenticity and integrity.


GitHub Actions vs Jenkins

GitHub ActionsJenkins
Cloud-basedSelf-hosted (commonly)
Easy GitHub integrationSupports many SCM systems
Simple YAML workflowsHighly customizable pipelines
Low maintenanceMore maintenance required

Interview Summary

ToolPurpose
GitVersion control
Pull RequestCode review
SonarQubeCode quality analysis
Unit TestsVerify business logic
Gradle BuildCompile APK/AAB
FastlaneAutomate release pipeline
Firebase App DistributionShare builds with testers
Play StorePublish app
GitHub Actions / JenkinsCI/CD automation
APK SigningRequired for secure release builds

60-Second Interview Answer

"In our Android CI/CD pipeline, developers create feature branches in Git and submit Pull Requests for code review. After approval and merge, GitHub Actions or Jenkins automatically triggers the pipeline. It checks out the code, builds the project using Gradle, runs unit tests, performs static analysis with SonarQube, and generates a signed APK or AAB. Fastlane then automates release tasks such as versioning and uploading builds. For QA, the app is distributed through Firebase App Distribution, and after validation, Fastlane uploads the signed AAB to the Google Play Console. This automation improves code quality, catches issues early, and makes releases faster and more reliable."

Comments

Popular posts from this blog

SonarQube With Angular 19 on Windows: A Complete Setup and Integration Guide

SwiftUI - Tutorial 2 - 🧵 Understanding @MainActor in SwiftUI — A Beginner’s Guide