otbeta/.drone.yml

61 lines
2.2 KiB
YAML
Raw Normal View History

2019-12-20 01:27:59 +00:00
---
2019-12-20 01:39:10 +00:00
kind: pipeline
name: build
2019-12-20 01:21:38 +00:00
workspace:
base: /src
path: .
2019-12-20 01:39:10 +00:00
steps:
- name: build
2019-12-20 01:21:38 +00:00
image: openjdk:8-jdk
environment:
2019-12-20 01:39:10 +00:00
ANDROID_COMPILE_SDK: 25
ANDROID_BUILD_TOOLS: 25.0.2
ANDROID_SDK_TOOLS: 3859397
2019-12-20 01:21:38 +00:00
commands:
- chmod +x ./gradlew
- export ANDROID_HOME=/src/android-sdk-linux
- export PATH=$${PATH}:$${ANDROID_HOME}/platform-tools/
- export GRADLE_USER_HOME=/src/.gradle
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
- wget --no-clobber --quiet --output-document=sdk-tools-linux-$${ANDROID_SDK_TOOLS}.zip https://dl.google.com/android/repository/sdk-tools-linux-$${ANDROID_SDK_TOOLS}.zip || true
2020-02-03 19:00:02 +00:00
- unzip -q -d $${ANDROID_HOME}/ sdk-tools-linux-$${ANDROID_SDK_TOOLS}.zip
2019-12-20 01:21:38 +00:00
- mkdir -p $${ANDROID_HOME}/licenses/
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $${ANDROID_HOME}/licenses/android-sdk-license
- mkdir -p $${HOME}/.android
- touch $${HOME}/.android/repositories.cfg
2020-02-03 20:21:32 +00:00
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager --update > /dev/null
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-$${ANDROID_COMPILE_SDK}" > /dev/null
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;$${ANDROID_BUILD_TOOLS}" > /dev/null
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;android;m2repository" > /dev/null
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;google;m2repository" > /dev/null
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;google;google_play_services" > /dev/null
2019-12-20 01:27:59 +00:00
- ./gradlew test
2019-12-20 01:21:38 +00:00
- ./gradlew build
2019-12-20 01:39:10 +00:00
- name: upload
2019-12-20 01:21:38 +00:00
image: vividboarder/drone-webdav
2019-12-20 01:39:10 +00:00
settings:
file: com.iamthefij.otbeta/build/outputs/apk/com.iamthefij.otbeta-debug.apk
destination: https://cloud.iamthefij.com/remote.php/dav/files/iamthefij/Android/Apks/
username:
from_secret: WEBDAV_USER
password:
from_secret: WEBDAV_PASSWORD
- name: notify
image: drillster/drone-email
settings:
host:
from_secret: smtp_host
username:
from_secret: smtp_user
password:
from_secret: smtp_pass
from: drone@iamthefij.com
when:
status: [changed, failure]