forked from fieldkit/mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.android
53 lines (45 loc) · 1.71 KB
/
Jenkinsfile.android
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@Library('conservify') _
conservifyProperties([ disableConcurrentBuilds() ])
timestamps {
node () {
try {
stage ('git') {
checkout scm
}
stage ("configuration") {
withCredentials([file(credentialsId: 'app-android-signing-data', variable: 'APP_ANDROID_SIGNING_DATA')]) {
sh "mkdir -p private && cp -f $APP_ANDROID_SIGNING_DATA private/private.zip && (cd private && unzip -o private.zip)"
}
withCredentials([file(credentialsId: 'app-android-google-services', variable: 'APP_ANDROID_GOOGLE_SERVICES')]) {
sh "cp -f $APP_ANDROID_GOOGLE_SERVICES app/App_Resources/Android"
}
}
stage ('build') {
def props = readProperties(file: "private/gradle.properties")
sh """
export PATH=$PATH:node_modules/.bin
export ANDROID_HOME=/var/jenkins_home/workspace/android-sdk/android-sdk
export FK_APP_RELEASE_STORE_FILE=private/${props.FK_APP_RELEASE_STORE_FILE}
export FK_APP_RELEASE_KEY_ALIAS=${props.FK_APP_RELEASE_KEY_ALIAS}
set +x
export FK_APP_RELEASE_STORE_PASSWORD=${props.FK_APP_RELEASE_STORE_PASSWORD}
export FK_APP_RELEASE_KEY_PASSWORD=${props.FK_APP_RELEASE_KEY_PASSWORD}
set -x
env
find . -name google-services.json
make clean-secrets
make android-release
"""
}
stage ('archive') {
archiveArtifacts artifacts: 'platforms/android/app/build/outputs/apk/release/*.apk, platforms/android/app/build/outputs/bundle/release/*.aab'
}
notifySuccess()
}
catch (Exception e) {
notifyFailure()
throw e;
}
}
refreshDistribution()
}