2018-08-14 18:09:52 +00:00
|
|
|
pipeline {
|
|
|
|
agent { label 'macos' }
|
|
|
|
|
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(
|
|
|
|
numToKeepStr: '10',
|
|
|
|
daysToKeepStr: '30',
|
2018-08-21 15:17:25 +00:00
|
|
|
artifactNumToKeepStr: '6',
|
2018-08-14 18:09:52 +00:00
|
|
|
))
|
|
|
|
}
|
|
|
|
|
|
|
|
environment {
|
|
|
|
LANG = 'en_US.UTF-8'
|
|
|
|
LANGUAGE = 'en_US.UTF-8'
|
|
|
|
LC_ALL = 'en_US.UTF-8'
|
|
|
|
FASTLANE_DISABLE_COLORS = 1
|
|
|
|
REALM_DISABLE_ANALYTICS = 1
|
|
|
|
ANDROID_HOME = '/usr/local/share/android-sdk'
|
|
|
|
ANDROID_SDK_ROOT = '/usr/local/share/android-sdk'
|
|
|
|
ANDROID_NDK = '/Users/jenkins/android-ndk-r10e'
|
|
|
|
ANDROID_NDK_HOME = '/Users/jenkins/android-ndk-r10e'
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage('Prep') {
|
|
|
|
steps {
|
|
|
|
script {
|
2018-08-21 15:17:25 +00:00
|
|
|
print "Running ${params.BUILD_TYPE} build!"
|
2018-08-14 18:09:52 +00:00
|
|
|
/* Necessary to load methods */
|
|
|
|
mobile = load 'ci/mobile.groovy'
|
2018-08-22 14:03:52 +00:00
|
|
|
mobile.prep(params.BUILD_TYPE)
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Tests') {
|
|
|
|
steps {
|
|
|
|
script { mobile.runTests() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
script { mobile.leinBuild() }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Compile') {
|
|
|
|
steps {
|
2018-08-22 14:03:52 +00:00
|
|
|
script { apk = mobile.android.compile(params.BUILD_TYPE) }
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
}
|
2018-08-21 15:17:25 +00:00
|
|
|
stage('Archive') {
|
2018-08-14 18:09:52 +00:00
|
|
|
steps {
|
2018-08-21 15:17:25 +00:00
|
|
|
script { archiveArtifacts apk }
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
}
|
2018-08-21 15:17:25 +00:00
|
|
|
stage('Upload') {
|
|
|
|
when { expression { params.BUILD_TYPE == 'release' } }
|
2018-08-14 18:09:52 +00:00
|
|
|
steps {
|
2018-08-21 15:17:25 +00:00
|
|
|
script { mobile.android.uploadToPlayStore() }
|
2018-08-14 18:09:52 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Run e2e') {
|
2018-08-21 15:17:25 +00:00
|
|
|
when { expression { params.BUILD_TYPE == 'e2e' } }
|
2018-08-14 18:09:52 +00:00
|
|
|
steps { script {
|
2018-08-21 15:17:25 +00:00
|
|
|
mobile.android.uploadToDiawi()
|
|
|
|
apk = mobile.android.uploadToSauceLabs()
|
2018-08-14 18:09:52 +00:00
|
|
|
build(
|
|
|
|
job: 'end-to-end-tests/status-app-nightly', wait: false,
|
|
|
|
parameters: [string(name: 'apk', value: "--apk=${apk}")]
|
|
|
|
)
|
|
|
|
} }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|