CI / CD
Bitbucket Pipelines
Automate Android and iOS mobile build uploads with Bitbucket Pipelines and BuildShare CLI.
Integrate BuildShare into your Bitbucket Pipelines to distribute mobile test builds automatically.
Prerequisites
- Add your BuildShare personal access token to your Bitbucket repository:
- Navigate to Repository Settings → Pipelines → Repository variables.
- Add a variable named
BUILDSHARE_TOKENand mark it as Secured.
- Commit
buildshare.jsonor.buildshare.yamlto the root of your repository.
Integration Steps
Add an upload step to your bitbucket-pipelines.yml:
- step:
name: Upload to BuildShare
script:
- curl -fsSL https://raw.githubusercontent.com/vishalkumardev/cli/main/install.sh | sh
- buildshare upload android --ci --json --notes "Bitbucket build $BITBUCKET_BUILD_NUMBER"
environment:
BUILDSHARE_TOKEN: $BUILDSHARE_TOKENComplete Pipeline Example
image: eclipse-temurin:17-jdk
pipelines:
branches:
main:
- step:
name: Build Android Release
script:
- chmod +x gradlew
- ./gradlew assembleRelease
artifacts:
- app/build/outputs/apk/release/**
- step:
name: Distribute to BuildShare
script:
- curl -fsSL https://raw.githubusercontent.com/vishalkumardev/cli/main/install.sh | sh
- buildshare upload android --ci --json --notes "Build $BITBUCKET_BUILD_NUMBER ($BITBUCKET_COMMIT)"
environment:
BUILDSHARE_TOKEN: $BUILDSHARE_TOKEN