2019-10-13 08:46:52 +08:00
|
|
|
---
|
2019-10-10 09:29:35 +08:00
|
|
|
kind: pipeline
|
2020-05-28 02:09:55 +08:00
|
|
|
type: docker
|
|
|
|
name: tests
|
2019-10-10 09:29:35 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2020-05-28 02:09:55 +08:00
|
|
|
- name: unit-tests
|
2019-10-10 09:29:35 +08:00
|
|
|
image: nextcloudci/android:android-49
|
2020-05-28 02:09:55 +08:00
|
|
|
depends_on: [ clone ]
|
2019-10-10 09:29:35 +08:00
|
|
|
commands:
|
|
|
|
- ./gradlew test
|
|
|
|
|
2020-05-28 02:09:55 +08:00
|
|
|
- name: check-formatting
|
2020-05-30 05:31:55 +08:00
|
|
|
image: zosiab/eclint:latest
|
2020-05-28 02:09:55 +08:00
|
|
|
depends_on: [ clone ]
|
|
|
|
commands:
|
2021-05-02 02:30:44 +08:00
|
|
|
- git pull origin main
|
|
|
|
- eclint check $(git diff --name-only origin/main)
|
2020-05-28 02:09:55 +08:00
|
|
|
|
|
|
|
# This may be used in the future, because it makes of intellij's native code inspection/formatting capabilities.
|
|
|
|
# Additional information: https://www.jetbrains.com/help/idea/command-line-formatter.html
|
|
|
|
#
|
|
|
|
# - name: do-or-check-formatting
|
|
|
|
# image: dlsniper/docker-intellij
|
|
|
|
# depends_on: [ clone ]
|
|
|
|
# commands:
|
|
|
|
# - /opt/intellij/bin/idea.sh inspect/format ...
|
2020-07-09 14:55:05 +08:00
|
|
|
#
|
|
|
|
# - name: do-or-check-formatting
|
|
|
|
# image: dlsniper/docker-intellij
|
|
|
|
# depends_on: [ clone ]
|
|
|
|
# commands:
|
|
|
|
# - /opt/intellij/bin/idea.sh format -s .idea/codeStyles/Project.xml -m *.java app/src/main/java
|
2020-05-28 02:09:55 +08:00
|
|
|
|
2019-10-13 08:46:52 +08:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
2020-05-28 02:09:55 +08:00
|
|
|
type: docker
|
|
|
|
name: code-analysis
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: check-global-formatting
|
2020-05-30 05:31:55 +08:00
|
|
|
image: zosiab/eclint:latest
|
2020-05-28 02:09:55 +08:00
|
|
|
depends_on: [ clone ]
|
|
|
|
commands:
|
|
|
|
- eclint check $(git ls-files)
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
branch:
|
2021-05-02 02:30:44 +08:00
|
|
|
- main
|
2020-05-28 02:09:55 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: build
|
2019-10-13 08:46:52 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2019-10-10 09:29:35 +08:00
|
|
|
- name: build
|
|
|
|
image: nextcloudci/android:android-49
|
|
|
|
commands:
|
2020-09-27 02:21:29 +08:00
|
|
|
- ./gradlew assembleFreeRelease
|
2019-10-10 09:29:35 +08:00
|
|
|
|
2020-04-16 00:09:29 +08:00
|
|
|
- name: sign
|
|
|
|
image: nextcloudci/android:android-49
|
|
|
|
environment:
|
2020-07-09 14:55:05 +08:00
|
|
|
BOT_TOKEN:
|
2020-04-16 00:09:29 +08:00
|
|
|
from_secret: BOT_TOKEN
|
|
|
|
KS_PASS:
|
|
|
|
from_secret: KS_PASS
|
|
|
|
KEY_PASS:
|
|
|
|
from_secret: KEY_PASS
|
|
|
|
OUTPUT: signed.apk
|
2020-09-27 02:21:29 +08:00
|
|
|
INSTANCE: https://codeberg.org
|
2020-04-16 00:09:29 +08:00
|
|
|
KS_FILE: ci_keystore.jks
|
|
|
|
KS_REPO:
|
|
|
|
from_secret: KS_REPO
|
|
|
|
commands:
|
|
|
|
- ./scripts/sign-build.sh
|
|
|
|
|
|
|
|
- name: publish
|
|
|
|
image: vividboarder/drone-webdav
|
|
|
|
environment:
|
2020-05-28 18:19:14 +08:00
|
|
|
WEBDAV_USERNAME: GitNexBot
|
|
|
|
WEBDAV_PASSWORD:
|
2020-04-16 00:09:29 +08:00
|
|
|
from_secret: NC_TOKEN
|
2020-05-28 18:19:14 +08:00
|
|
|
PLUGIN_FILE: 'signed.apk'
|
|
|
|
PLUGIN_TIMEOUT: 180
|
|
|
|
PLUGIN_ATTEMPTS: 5
|
2020-07-09 21:18:21 +08:00
|
|
|
PLUGIN_DESTINATION: 'https://cloud.swatian.com/remote.php/dav/files/GitNexBot/gitnex/builds/latest.apk'
|
2020-05-28 18:19:14 +08:00
|
|
|
PLUGIN_CUSTOM_ARGUMENTS: '--progress-bar'
|
2020-04-16 00:09:29 +08:00
|
|
|
|
2019-10-10 09:29:35 +08:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
2019-10-14 17:27:04 +08:00
|
|
|
branch:
|
2021-05-02 02:30:44 +08:00
|
|
|
- main
|