status-react/ci/Jenkinsfile.android

73 lines
1.6 KiB
Plaintext
Raw Normal View History

pipeline {
agent { label 'macos' }
options {
buildDiscarder(logRotator(
numToKeepStr: '10',
daysToKeepStr: '30',
artifactNumToKeepStr: '4',
))
}
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 {
/* Necessary to load methods */
mobile = load 'ci/mobile.groovy'
mobile.prepDeps()
}
}
}
stage('Tests') {
steps {
script { mobile.runTests() }
}
}
stage('Build') {
steps {
script { mobile.leinBuild() }
}
}
stage('Compile') {
steps {
script { apk = mobile.compileAndroid(e2e: params.RUN_E2E) }
}
}
stage('Bundle') {
when { expression { !params.RUN_E2E } }
steps {
script { mobile.bundleAndroid() }
}
}
stage('Archive') {
when { expression { !params.RUN_E2E } }
steps {
script { archiveArtifacts apk }
}
}
stage('Run e2e') {
when { expression { params.RUN_E2E } }
steps { script {
apk = mobile.uploadSauceLabs()
build(
job: 'end-to-end-tests/status-app-nightly', wait: false,
parameters: [string(name: 'apk', value: "--apk=${apk}")]
)
} }
}
}
}