ReaderForSelfoss-multiplatform/.drone.yml

75 lines
2.3 KiB
YAML
Raw Normal View History

2022-07-23 20:28:06 +00:00
kind: pipeline
type: docker
2022-09-13 19:52:23 +00:00
name: android
2022-09-13 18:45:47 +00:00
steps:
2022-09-13 19:52:23 +00:00
- name: code-analysis
image: mingc/android-build-box:latest
failure: ignore
commands:
- ls -la
- ./gradlew sonarqube -Dsonar.projectKey=RFS2 -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\""
environment:
SONAR_HOST_URL:
from_secret: sonarScannerHostUrl
SONAR_LOGIN:
from_secret: sonarScannerLogin
- name: build
2022-09-13 18:45:47 +00:00
image: mingc/android-build-box:latest
commands:
2022-09-13 18:59:03 +00:00
- ./gradlew :androidApp:assembleGithubConfigRelease -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false
2022-09-13 19:52:23 +00:00
- name: saveBuild
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
rebuild: true
mount:
- ./androidApp/build/outputs/apk/githubConfig/release/
cache_key: [ DRONE_REPO_NAME, DRONE_BRANCH ]
volumes:
- name: cache
host:
path: /tmp/cache
---
kind: pipeline
type: docker
name: Deploy
steps:
- name: getNodeModules
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./androidApp/build/outputs/apk/githubConfig/release/
cache_key: [ DRONE_REPO_NAME, DRONE_BRANCH ]
- name: sign
image: mingc/android-build-box:latest
commands:
2022-09-13 19:19:45 +00:00
- wget https://amine-louveau.fr/key
2022-09-13 19:47:23 +00:00
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./key -storepass $YOUR_KEYSTORE_PASSWORD androidApp/build/outputs/apk/githubConfig/release/androidApp-githubConfig-release-unsigned.apk $YOUR_KEY_ALIAS
- $ANDROID_HOME/build-tools/31.0.0/zipalign -v 4 androidApp/build/outputs/apk/githubConfig/release/androidApp-githubConfig-release-unsigned.apk androidApp/build/outputs/apk/githubConfig/release/android-prod-released-signed.apk
- $ANDROID_HOME/build-tools/31.0.0/apksigner verify androidApp/build/outputs/apk/githubConfig/release/android-prod-released-signed.apk
2022-09-13 18:45:47 +00:00
environment:
YOUR_KEYSTORE_PASSWORD:
2022-09-13 18:59:03 +00:00
from_secret: keyPass
2022-09-13 18:45:47 +00:00
YOUR_KEY_ALIAS:
2022-09-13 18:59:03 +00:00
from_secret: keyAlias
2022-09-13 18:45:47 +00:00
trigger:
branch:
2022-09-13 19:52:23 +00:00
- drone-sigh
volumes:
- name: cache
host:
path: /tmp/cache