2018-08-14 14:09:52 -04:00
|
|
|
pipeline {
|
|
|
|
agent { label 'fastlane' }
|
|
|
|
|
|
|
|
options {
|
2018-10-30 10:38:52 +01:00
|
|
|
/* Prevent Jenkins jobs from running forever */
|
|
|
|
timeout(time: 25, unit: 'MINUTES')
|
|
|
|
/* Limit builds retained */
|
2018-08-14 14:09:52 -04:00
|
|
|
buildDiscarder(logRotator(
|
2018-10-30 10:38:52 +01:00
|
|
|
numToKeepStr: '60',
|
2018-08-14 14:09:52 -04:00
|
|
|
daysToKeepStr: '30',
|
2018-10-30 10:38:52 +01:00
|
|
|
artifactNumToKeepStr: '60',
|
2018-08-14 14:09:52 -04:00
|
|
|
))
|
|
|
|
}
|
2018-09-25 20:01:48 +03:00
|
|
|
|
2018-08-14 14:09:52 -04:00
|
|
|
environment {
|
2018-09-18 08:22:30 -04:00
|
|
|
BUILD_PLATFORM = 'ios'
|
2018-08-14 14:09:52 -04:00
|
|
|
LANG = 'en_US.UTF-8'
|
|
|
|
LANGUAGE = 'en_US.UTF-8'
|
|
|
|
LC_ALL = 'en_US.UTF-8'
|
|
|
|
FASTLANE_DISABLE_COLORS=1
|
|
|
|
REALM_DISABLE_ANALYTICS=1
|
2018-08-31 22:36:51 -04:00
|
|
|
BUNDLE_PATH = "${HOME}/.bundle"
|
2018-08-14 14:09:52 -04:00
|
|
|
}
|
2018-09-25 20:01:48 +03:00
|
|
|
|
2018-08-14 14:09:52 -04:00
|
|
|
stages {
|
|
|
|
stage('Prep') {
|
|
|
|
steps {
|
|
|
|
script {
|
2018-08-21 11:17:25 -04:00
|
|
|
print "Running ${params.BUILD_TYPE} build!"
|
2018-08-14 14:09:52 -04:00
|
|
|
/* Necessary to load methods */
|
|
|
|
mobile = load 'ci/mobile.groovy'
|
2018-08-29 09:43:21 +02:00
|
|
|
cmn = load 'ci/common.groovy'
|
|
|
|
mobile.prep(cmn.getBuildType())
|
2018-08-14 14:09:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-08-27 11:32:54 -04:00
|
|
|
stage('Lint') {
|
|
|
|
steps {
|
2018-09-25 20:01:48 +03:00
|
|
|
script { cmn.runLint() }
|
2018-08-27 11:32:54 -04:00
|
|
|
}
|
|
|
|
}
|
2018-08-14 14:09:52 -04:00
|
|
|
stage('Tests') {
|
|
|
|
steps {
|
2018-09-25 20:01:48 +03:00
|
|
|
script { cmn.runTests() }
|
2018-08-14 14:09:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2018-08-29 14:38:12 +02:00
|
|
|
script { mobile.leinBuild('ios') }
|
2018-08-14 14:09:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Compile') {
|
|
|
|
steps {
|
2018-08-29 09:43:21 +02:00
|
|
|
script { api = mobile.ios.compile(cmn.getBuildType()) }
|
2018-08-14 14:09:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Archive') {
|
|
|
|
steps {
|
|
|
|
script { archiveArtifacts api }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Upload') {
|
|
|
|
steps {
|
2018-08-21 11:17:25 -04:00
|
|
|
script { env.DIAWI_URL = mobile.ios.uploadToDiawi() }
|
2018-08-14 14:09:52 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|