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
|
|
|
|
- unzip -d $${ANDROID_HOME}/ sdk-tools-linux-$${ANDROID_SDK_TOOLS}.zip
|
|
|
|
- mkdir -p $${ANDROID_HOME}/licenses/
|
|
|
|
- echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $${ANDROID_HOME}/licenses/android-sdk-license
|
|
|
|
- mkdir -p $${HOME}/.android
|
|
|
|
- touch $${HOME}/.android/repositories.cfg
|
|
|
|
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager --update
|
|
|
|
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-$${ANDROID_COMPILE_SDK}"
|
|
|
|
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;$${ANDROID_BUILD_TOOLS}"
|
|
|
|
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;android;m2repository"
|
|
|
|
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;google;m2repository"
|
|
|
|
- echo y | $${ANDROID_HOME}/tools/bin/sdkmanager "extras;google;google_play_services"
|
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]
|