-
Notifications
You must be signed in to change notification settings - Fork 101
/
Jenkinsfile.release
50 lines (44 loc) · 1.17 KB
/
Jenkinsfile.release
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/env groovy
pipeline {
agent {
label 'MAC'
}
environment {
PATH = "$HOME/.rbenv/shims:$PATH"
}
parameters {
gitParameter defaultValue: 'origin/master', name: 'gitBranch', type: 'BRANCH', description: 'Select the branch you want to build e.g. origin/master.'
password name: 'CI_PASSWORD', description: ''
password name: 'FASTLANE_SESSION', description: ''
password name: 'FIREBASE_API_KEY', description: ''
password name: 'FIREBASE_GOOGLE_APP_ID', description: ''
}
options {
timeout(time: 2, unit: 'HOURS')
timestamps()
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
}
stages {
stage('Prepare') {
steps {
withCredentials([usernamePassword(credentialsId: '29a4006b-0d8b-4fe9-9237-b00856bdb0de', passwordVariable: 'PASSWORD', usernameVariable: 'USERNAME')]) {
script {
unlockMACKeychain "${PASSWORD}"
}
}
sh 'cd src && bundle install'
}
}
stage('Release') {
steps {
sh 'cd src && bundle exec fastlane ios release'
}
}
}
post {
always {
// clean workspace
deleteDir()
}
}
}