mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 03:18:06 +00:00
Restored gitlab CI sign & upload jobs
This commit is contained in:
parent
a53542c092
commit
ce5a5c5ddc
4 changed files with 40 additions and 3 deletions
|
|
@ -8,15 +8,21 @@ job-android:
|
||||||
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then eval $(ssh-agent -s); fi
|
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then eval $(ssh-agent -s); fi
|
||||||
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then echo "$SCP_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null; fi
|
- if ! [ -z ${SCP_PRIVATE_KEY+x} ]; then echo "$SCP_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null; fi
|
||||||
- if ! [ -z ${ANDROID_SETTINGS_GRADLE+x} ]; then echo "$ANDROID_SETTINGS_GRADLE" > settings.gradle.kts; fi
|
- if ! [ -z ${ANDROID_SETTINGS_GRADLE+x} ]; then echo "$ANDROID_SETTINGS_GRADLE" > settings.gradle.kts; fi
|
||||||
- git config --global --add safe.directory /builds/BC/private/linphone-android-6.0
|
- git config --global --add safe.directory /builds/BC/private/linphone-android
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
- scp -oStrictHostKeyChecking=no $DEPLOY_SERVER:$ANDROID_KEYSTORE_PATH app/
|
||||||
|
- scp -oStrictHostKeyChecking=no $DEPLOY_SERVER:$ANDROID_GOOGLE_SERVICES_PATH app/
|
||||||
|
- echo storePassword=$ANDROID_KEYSTORE_PASSWORD > keystore.properties
|
||||||
|
- echo keyPassword=$ANDROID_KEYSTORE_KEY_PASSWORD >> keystore.properties
|
||||||
|
- echo keyAlias=$ANDROID_KEYSTORE_KEY_ALIAS >> keystore.properties
|
||||||
|
- echo storeFile=$ANDROID_KEYSTORE_FILE >> keystore.properties
|
||||||
- ./gradlew app:dependencies | grep org.linphone
|
- ./gradlew app:dependencies | grep org.linphone
|
||||||
- ./gradlew assembleDebug
|
- ./gradlew assembleDebug
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- ./app/build/outputs/apk/debug/linphone-android-debug-6.0.0.apk
|
- ./app/build/outputs/apk/debug/linphone-android-debug-*.apk
|
||||||
when: always
|
when: always
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
|
||||||
|
|
@ -24,4 +30,4 @@ job-android:
|
||||||
.scheduled-job-android:
|
.scheduled-job-android:
|
||||||
extends: job-android
|
extends: job-android
|
||||||
only:
|
only:
|
||||||
- schedules
|
- schedules
|
||||||
12
.gitlab-ci-files/job-upload.yml
Normal file
12
.gitlab-ci-files/job-upload.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
job-android-upload:
|
||||||
|
|
||||||
|
stage: deploy
|
||||||
|
tags: [ "deploy" ]
|
||||||
|
|
||||||
|
only:
|
||||||
|
- schedules
|
||||||
|
dependencies:
|
||||||
|
- job-android
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cd app/build/outputs/apk/ && rsync ./debug/*.apk $DEPLOY_SERVER:$ANDROID_DEPLOY_DIRECTORY
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
import com.android.build.gradle.internal.tasks.factory.dependsOn
|
||||||
import com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension
|
import com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsExtension
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
|
import java.io.FileInputStream
|
||||||
|
import java.util.Properties
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.androidApplication)
|
alias(libs.plugins.androidApplication)
|
||||||
|
|
@ -107,6 +109,19 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||||
|
val keystoreProperties = Properties()
|
||||||
|
keystoreProperties.load(FileInputStream(keystorePropertiesFile))
|
||||||
|
|
||||||
|
signingConfigs {
|
||||||
|
create("release") {
|
||||||
|
storeFile = File(keystoreProperties["storeFile"].toString())
|
||||||
|
storePassword = keystoreProperties["storePassword"].toString()
|
||||||
|
keyAlias = keystoreProperties["keyAlias"].toString()
|
||||||
|
keyPassword = keystoreProperties["keyPassword"].toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
getByName("debug") {
|
getByName("debug") {
|
||||||
if (useDifferentPackageNameForDebugBuild) {
|
if (useDifferentPackageNameForDebugBuild) {
|
||||||
|
|
|
||||||
4
keystore.properties
Normal file
4
keystore.properties
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
storePassword=
|
||||||
|
keyPassword=
|
||||||
|
keyAlias=
|
||||||
|
storeFile=bc-android.keystore
|
||||||
Loading…
Add table
Reference in a new issue