status-mobile/ci/Jenkinsfile.ios
Jakub Sokołowski a91a799eb5
add an e2e build target for ios
Squashe commits:
- add an e2e build target for ios
- add correct sdk and destination for simulator
- fixup! add correct sdk and destination for simulator
- drop xcarchive_path since we are not using it
- temporarily bind ios build to macos-03
- Detect installed simulator SDK and use it.
- Signed-off-by: Jakub Sokołowski <jakub@status.im>

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2018-12-05 18:43:11 +01:00

81 lines
1.9 KiB
Plaintext

pipeline {
agent { label 'macos' }
options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 35, unit: 'MINUTES')
/* Limit builds retained */
buildDiscarder(logRotator(
numToKeepStr: '90',
daysToKeepStr: '60',
artifactNumToKeepStr: '60',
))
}
environment {
NODE_VERSION = 'v10.14.1'
BUILD_PLATFORM = 'ios'
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"
}
stages {
stage('Prep') {
steps {
script { nvm(env.NODE_VERSION) {
print "Running ${params.BUILD_TYPE} build!"
/* Necessary to load methods */
mobile = load 'ci/mobile.groovy'
cmn = load 'ci/common.groovy'
/* Cleanup and Prep */
mobile.prep(cmn.getBuildType())
/* Run at start to void mismatched numbers */
cmn.buildNumber()
} }
}
}
stage('Lint') {
steps { nvm(env.NODE_VERSION) {
script { cmn.runLint() }
} }
}
stage('Tests') {
steps { nvm(env.NODE_VERSION) {
script { cmn.runTests() }
} }
}
stage('Build') {
steps { nvm(env.NODE_VERSION) {
script { mobile.leinBuild('ios') }
} }
}
stage('Compile') {
steps { nvm(env.NODE_VERSION) {
script { api = mobile.ios.compile(cmn.getBuildType()) }
} }
}
stage('Archive') {
steps {
script { archiveArtifacts api }
}
}
stage('Upload') {
steps {
script {
switch (cmn.getBuildType()) {
case 'nightly':
env.DIAWI_URL = mobile.ios.uploadToDiawi(); break;
case 'e2e':
env.SAUCE_URL = mobile.ios.uploadToSauceLabs(); break;
}
}
}
}
}
}