forked from Catrobat/Catty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
57 lines (51 loc) · 1.31 KB
/
Jenkinsfile
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
53
54
55
56
57
#!/usr/bin/env groovy
pipeline {
agent {
label 'MAC'
}
environment {
PATH = "$HOME/.rbenv/shims:$PATH"
}
options {
timeout(time: 2, unit: 'HOURS')
timestamps()
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
}
triggers {
issueCommentTrigger('.*test this please.*')
}
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('Build') {
steps {
sh 'cd src && bundle exec fastlane ios build_catty'
}
post {
always {
archiveArtifacts(artifacts: 'src/fastlane/builds/', allowEmptyArchive: true)
archiveArtifacts(artifacts: 'src/fastlane/Install.html', allowEmptyArchive: true)
archiveArtifacts(artifacts: 'src/fastlane/Adhoc.plist', allowEmptyArchive: true)
}
}
}
stage('Test') {
steps {
sh 'cd src && bundle exec fastlane ios tests'
}
}
}
post {
always {
junit testResults: 'src/fastlane/test_output/report.junit', allowEmptyResults: true
}
}
}