2018-09-21 11:57:06 +00:00
|
|
|
pipeline {
|
|
|
|
agent { label 'linux' }
|
|
|
|
|
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(
|
|
|
|
numToKeepStr: '60',
|
|
|
|
daysToKeepStr: '30',
|
|
|
|
artifactNumToKeepStr: '60',
|
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
BUILD_PLATFORM = 'android'
|
|
|
|
LANG = 'en_US.UTF-8'
|
|
|
|
LANGUAGE = 'en_US.UTF-8'
|
|
|
|
LC_ALL = 'en_US.UTF-8'
|
|
|
|
FASTLANE_DISABLE_COLORS = 1
|
|
|
|
REALM_DISABLE_ANALYTICS = 1
|
|
|
|
BUNDLE_PATH = "${HOME}/.bundle"
|
|
|
|
ANDROID_HOME = '/usr/lib/android-sdk'
|
|
|
|
ANDROID_SDK_ROOT = '/usr/lib/android-sdk'
|
|
|
|
ANDROID_NDK = '/usr/lib/android-ndk'
|
|
|
|
ANDROID_NDK_HOME = '/usr/lib/android-ndk'
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Prep') {
|
|
|
|
steps { script {
|
|
|
|
/* Necessary to load methods */
|
|
|
|
mobile = load 'ci/mobile.groovy'
|
|
|
|
cmn = load 'ci/common.groovy'
|
|
|
|
mobile.prep('release')
|
|
|
|
} }
|
2018-04-04 16:36:26 +00:00
|
|
|
}
|
2018-09-21 11:57:06 +00:00
|
|
|
stage('Lint') {
|
|
|
|
steps { script { cmn.runLint() } }
|
|
|
|
}
|
|
|
|
stage('Tests') {
|
|
|
|
steps { script { cmn.runTests() } }
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps { script { mobile.leinBuild('android') } }
|
|
|
|
}
|
|
|
|
stage('Compile') {
|
|
|
|
steps { script { apk = mobile.android.compile('release') } }
|
|
|
|
}
|
|
|
|
stage('Archive') {
|
|
|
|
steps { script { archiveArtifacts apk } }
|
|
|
|
}
|
|
|
|
stage('Upload') {
|
|
|
|
steps { script { mobile.android.uploadToPlayStore('release') } }
|
2018-05-07 13:13:10 +00:00
|
|
|
}
|
2018-09-21 11:57:06 +00:00
|
|
|
}
|
2018-04-04 16:36:26 +00:00
|
|
|
}
|