Skip to content

Instantly share code, notes, and snippets.

@silvernoo
Created January 10, 2024 09:29
Show Gist options
  • Save silvernoo/738f89a3ab39cb0bd35c11ab9076a1d6 to your computer and use it in GitHub Desktop.
Save silvernoo/738f89a3ab39cb0bd35c11ab9076a1d6 to your computer and use it in GitHub Desktop.
kind: pipeline
type: docker
name: android
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /drone/src/cache
settings:
restore: true
mount:
- .
- name: build
image: benjyair/android-env
commands:
- pwd
- apt install -y wget
- |
if [ -d jdk-11.0.2 ]; then
rm jdk-11.0.2_linux-x64_bin.tar.gz*|| true
else
wget https://repo.huaweicloud.com/java/jdk/11.0.2+9/jdk-11.0.2_linux-x64_bin.tar.gz
tar -xvf jdk-11.0.2_linux-x64_bin.tar.gz
rm jdk-11.0.2_linux-x64_bin.tar.gz*|| true
fi
- ./gradlew assembleDevelopDebug -Dorg.gradle.java.home="jdk-11.0.2/"
- name: rebuild-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /drone/src/cache
settings:
rebuild: true
mount:
- .
- name: upload
image: minio/mc
environment:
ACCESS_KEY:
from_secret: drone_access_key
SECRET_KEY:
from_secret: drone_secret_key
commands:
- mc alias set minio http://192.168.0.10:8011 $ACCESS_KEY $SECRET_KEY
- cd app/build/outputs/apk/develop/debug
- apk_file=`ls | head -1`
- mc cp $apk_file minio/mbu-apk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment