2022-07-23 20:28:06 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-09-14 04:53:37 +00:00
|
|
|
name: test
|
2022-09-13 19:52:23 +00:00
|
|
|
|
|
|
|
steps:
|
2022-09-14 04:53:37 +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
|
|
|
|
|
2022-09-14 06:49:42 +00:00
|
|
|
- name: build
|
2022-09-14 04:53:37 +00:00
|
|
|
image: mingc/android-build-box:latest
|
|
|
|
commands:
|
|
|
|
- ./gradlew :androidApp:build -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false
|
2022-09-14 06:49:42 +00:00
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|
|
|
|
- pull_request
|
2022-09-14 04:53:37 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Publish
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: createTag
|
2022-09-14 06:49:42 +00:00
|
|
|
image: ubuntu:latest
|
2022-09-14 04:53:37 +00:00
|
|
|
commands:
|
2022-09-14 08:17:19 +00:00
|
|
|
- apt-get update && apt-get install -y git
|
2022-09-14 04:53:37 +00:00
|
|
|
- ./build.sh
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- promote
|
|
|
|
target:
|
|
|
|
- production
|
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: Release
|
2022-09-13 20:11:35 +00:00
|
|
|
|
2022-09-14 04:53:37 +00:00
|
|
|
steps:
|
|
|
|
- name: build
|
2022-09-13 19:52:23 +00:00
|
|
|
image: mingc/android-build-box:latest
|
|
|
|
commands:
|
2022-09-13 19:56:24 +00:00
|
|
|
- ./gradlew :androidApp:assembleGithubConfigRelease -PignoreGitVersion=true -P appLoginUrl="\"URL\"" -P appLoginUsername="\"LOGIN\"" -P appLoginPassword="\"PASS\"" -P pushCache=false
|
2022-09-14 04:53:37 +00:00
|
|
|
|
|
|
|
- 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 20:11:35 +00:00
|
|
|
- $ANDROID_HOME/build-tools/31.0.0/zipalign -f -v 4 androidApp/build/outputs/apk/githubConfig/release/androidApp-githubConfig-release-unsigned.apk androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk
|
2022-09-13 20:20:10 +00:00
|
|
|
- $ANDROID_HOME/build-tools/31.0.0/apksigner sign -v --out signed.apk --ks ./key --ks-key-alias $YOUR_KEY_ALIAS --ks-pass pass:$YOUR_KEYSTORE_PASSWORD --v1-signing-enabled true --v2-signing-enabled true androidApp/build/outputs/apk/githubConfig/release/android-prod-released-ziped.apk
|
2022-09-13 20:11:35 +00:00
|
|
|
- $ANDROID_HOME/build-tools/31.0.0/apksigner verify 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 20:11:35 +00:00
|
|
|
|
2022-09-14 04:53:37 +00:00
|
|
|
- name: gitea_release
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
api_key:
|
|
|
|
from_secret: giteaAPI
|
|
|
|
base_url: https://gitea.amine-louveau.fr
|
|
|
|
files: signed.apk
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- tag
|