Android

Build APK and AAB artifacts, sign them with vault-stored keystores, and publish directly to Google Play — all from a single Opsera pipeline with zero manual scripting.

circle-info

Prerequisites

  • Android Google Play tool registered in Opsera Tool Registry

  • JFrog Artifactory Maven tool registered(optional — only for artifact push to JFrog)

  • Git repository registered in Tool Registry (GitHub, GitLab, or Bitbucket)

  • Keystore (.jks) stored in Opsera's encrypted vault for release signing

Script types

Script type
Generated command
Output

Gradle Bundle Release

./gradlew bundleRelease

AAB for Google Play

Gradle Assemble Release

./gradlew assembleRelease

Release APK

Gradle Assemble Debug

./gradlew assembleDebug

Debug APK for QA

Custom Command

Manual entry

User-defined

Pipeline Setup

1

Create the pipeline

Go to Pipelines → Create Blank Pipeline → Workflow → Edit Workflow.

2

Create a build android step

Click +. Step Setup: Tool = Build, Step Type = Build. In Step Settings set Type to Android, choose a Script Type, and set Container Size based on project complexity (Small → Extra Large). based on project complexity (Small → Extra Large).

Field
Description

SCM Type

GitHub / GitLab / Bitbucket

Script Type

Gradle Bundle Release, Assemble Release, Assemble Debug, or Custom

Artifact File Path (AAB)

app/build/outputs/bundle/release/app-release.aab

Artifact File Path (APK)

app/build/outputs/apk/release/app-release.apk

Container Size

Small → Extra Large based on build complexity

3

Enable signing (release builds only)

Toggle Sign Artifact on. Select the keystore from Opsera's vault. Keys are injected at runtime only — never logged or stored in source code.

4

Add JFrog Artifactory step (optional)

Tool = JFrog Artifactory Maven, Step Type = Deploy. Set Dependency to the build step. Configure Group Name, Artifact Name, and optionally enable Use Run Count as Version.

5

Add Android Publish step

Tool = Android App Deploy, Step Type = Deploy. Set Dependency to the build step.

Field
Description

Track

Internal / Alpha / Beta / Production

Release Status

Draft = saves without publishing; Completed = publishes immediately

Package Name

Unique app ID registered in Google Play Console

Release Notes

Describe changes for this release version

6

Run and Monitor

Click Start Pipeline. View results at Summary → Pipeline Logs → Console Output.

circle-info

Points to remember

  • UseAAB (Gradle Bundle Release)for production Google Play releases — Google recommends AAB over APK for Play distribution as it enables dynamic delivery.

  • UseDraftrelease status during initial rollouts to allow manual review in Google Play Console before going live.

  • If a unit test fails at any point, the pipeline halts immediately — no artifacts are published and stakeholders are notified.

  • To publish to multiple tracks simultaneously, add multiple publish steps in the same pipeline — each with a different Track value.

  • Rollback must be done manually in Google Play Console — Opsera does not auto-rollback to prevent unintended changes to production.?

FAQs

chevron-rightHow are signing Credentials secured?hashtag

Keystores and API keys are stored in Opsera's encrypted vault and injected only during pipeline execution. They never appear in logs or source code.

chevron-rightCan I use GitLab or Bitbucket?hashtag

Yes. Opsera supports GitHub, GitLab, and Bitbucket. Configure your SCM account under Tool Registry before creating the pipeline.

chevron-rightWhat artifact types are supported? AAB (Android App Bundle) via Gradle Bundle Release, and APK via Gradle Assemble Release or Gradle Assemble Debug. AAB is recommended for Google Play; APK for direct distribution or debug builds.hashtag

chevron-rightCan I run QA builds and production builds in the same pipeline?hashtag

Yes. Add multiple build steps using different Script Types (e.g. Gradle Assemble Debug for QA, Gradle Bundle Release for production) and chain them with separate publish steps.

Last updated