Skip to content

docker-android provides general purpose docker images to run CI steps of Android project.

Notifications You must be signed in to change notification settings

faberNovel/docker-android

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-android

docker-android

Run test & large tests daily License: GPL v3 Release

docker-android provides general purpose docker images to run CI steps of Android project. Docker allows you to provide a replicable environment, which does not change with the host machine or the CI service. It should work out of the box on any CI/CD service providing docker support. The image is providing standard tools to build and test Android application:

  • Android SDK (optionally Android NDK)
  • Default Ruby env through rbenv (for Fastlane for instance)
  • Java JDK
  • Google Cloud CLI, to support Firebase Test Lab

CI/CD service support

CI/CD service Tested
GitHub Actions
GitLab CI
Circle CI 🚧
Travis CI 🚧

🐙 GitHub Action Sample

name: GitHub Action sample

on:
  push:
    branches:
      - develop

jobs:
  build_test_and_deploy:
    runs-on: ubuntu-18.04 # Works also with self hosted runner supporting docker
    container:
      image: docker://fabernovel/android:api-29-v1.0.0

  steps:
    - name: Checkout
      uses: actions/checkout@v2.1.0

    - name: Ruby cache
      uses: actions/cache@v1.1.2
      with:
        path: vendor/bundle
        key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
        restore-keys: |
          ${{ runner.os }}-gems-

    - name: Gradle cache
      uses: actions/cache@v1.1.2
      with:
        path: /root/.gradle
        key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
        restore-keys: |
          ${{ runner.os }}-gradle

    - name: Bundle install
      run: |
        bundle config path vendor/bundle
        bundle check || bundle install

    - name: Fastlane
      run: bundle exec fastlane my_lane

    - name: Cache workaround # https://github.com/actions/cache/issues/133
      run: chmod -R a+rwx .

📦 Container Registry

docker-android images are hosted on DockerHub.

🔤 Naming

We provide stable and snapshot variants for latest Android API levels, including or not native SDK. We use the following tagging policy: API-NDK-VERSION

  • API the Android API to use, like api-28, api-29
  • NDK is the presence or not of the Android NDK in the image
  • VERSION is the image version. Check Versions

🔢 Versions

  • snapshot versions are build on each push on develop branch
  • Release versions v* on each GitHub Release

📝 Image description

Image description (software and their versions) is provided as asset with each GitHub Release.

✏️ Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

You can change image settings via its Dockerfile. You can build, test, and deploy image using ci_cd.sh script. You need to install docker first. All scripts must be POSIX compliants.

usage: ./ci_cd.sh [--android-api 29] [--build] [--test]
  --android-api <androidVersion> Use specific Android version from `sdkmanager --list`
  --android-ndk                  Install Android NDK
  --ndk-version <version>        Install a specific Android NDK version from `sdkmanager --list`
  --build                        Build image
  --test                         Test image
  --deploy                       Deploy image

License

GNU GPLv3