2022-07-23 20:28:06 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-08-17 08:43:56 +00:00
|
|
|
name: android
|
2022-07-23 20:28:06 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: code-analysis
|
2022-07-23 20:39:48 +00:00
|
|
|
image: mingc/android-build-box:latest
|
2022-07-23 20:28:06 +00:00
|
|
|
failure: ignore
|
|
|
|
commands:
|
|
|
|
- ls -la
|
2022-08-17 12:52:03 +00:00
|
|
|
- ./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\""
|
2022-07-23 20:28:06 +00:00
|
|
|
environment:
|
|
|
|
SONAR_HOST_URL:
|
|
|
|
from_secret: sonarScannerHostUrl
|
|
|
|
SONAR_LOGIN:
|
|
|
|
from_secret: sonarScannerLogin
|
2022-08-17 12:03:32 +00:00
|
|
|
|
|
|
|
- name: build
|
|
|
|
image: mingc/android-build-box:latest
|
|
|
|
commands:
|
2022-09-13 18:45:47 +00:00
|
|
|
- ./gradlew :androidApp:build -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Deploy
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build-and-sign
|
|
|
|
image: mingc/android-build-box:latest
|
|
|
|
commands:
|
|
|
|
- ./gradlew :androidApp:assembleRelease -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false
|
|
|
|
- wget https://amine-louveau.fr/testtest_everywhere
|
|
|
|
- jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ./testtest_everywhere -storepass YOUR_KEYSTORE_PASSWORD androidApp/build/outputs/apk/githubConfig/release/androidApp-githubConfig-release-unsigned.apk YOUR_KEY_ALIAS
|
|
|
|
- $ANDROID_HOME/build-tools/version/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/version/apksigner verify androidApp/build/outputs/apk/githubConfig/release/android-prod-released-signed.apk
|
|
|
|
environment:
|
|
|
|
YOUR_KEYSTORE_PASSWORD:
|
|
|
|
from_secret: YOUR_KEYSTORE_PASSWORD
|
|
|
|
YOUR_KEY_ALIAS:
|
|
|
|
from_secret: YOUR_KEY_ALIAS
|
|
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- drone-sigh
|