-
Notifications
You must be signed in to change notification settings - Fork 100
/
Jenkinsfile.screenshots
52 lines (46 loc) · 1.14 KB
/
Jenkinsfile.screenshots
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
51
52
#!/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.'
}
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('Take Catty_Screenshots') {
steps {
sh 'cd src && bundle exec fastlane ios screenshots'
}
}
stage('Save Catty_Screenshots artifacts') {
steps {
sh 'sleep 180'
archiveArtifacts artifacts: 'src/fastlane/screenshots/**/*.*'
}
}
}
post {
always {
// clean workspace
deleteDir()
}
}
}