forked from calabash/calabash-ios-server
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
109 lines (103 loc) · 3.02 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/env groovy
pipeline {
agent { label 'master' }
environment {
DEVELOPER_DIR='/Xcode/10.1/Xcode.app/Contents/Developer'
XCPRETTY=1
SLACK_COLOR_DANGER = '#E01563'
SLACK_COLOR_INFO = '#6ECADC'
SLACK_COLOR_WARNING = '#FFC300'
SLACK_COLOR_GOOD = '#3EB991'
PROJECT_NAME = 'calabash-ios-server'
}
options {
disableConcurrentBuilds()
buildDiscarder(logRotator(numToKeepStr: '10'))
timeout(time: 60, unit: 'MINUTES')
}
stages {
stage('announce') {
steps {
slackSend(color: "${env.SLACK_COLOR_INFO}",
message: "${env.PROJECT_NAME} [${env.GIT_BRANCH}] #${env.BUILD_NUMBER} *Started* (<${env.BUILD_URL}|Open>)")
}
}
stage('build') {
parallel {
stage('framework') {
steps {
sh 'make framework'
}
}
stage('dylibs') {
steps {
sh 'make dylibs'
}
}
}
}
stage('prepare') {
parallel {
stage('ipa') {
steps {
sh 'MAKE_FRAMEWORK=0 make ipa-cal'
}
}
stage('bundle') {
steps {
sh 'bundle install'
}
}
stage('appcenter-cli') {
steps {
sh 'npm install -g appcenter-cli'
}
}
}
}
stage('test') {
parallel {
stage('appcenter') {
steps {
sh 'bin/ci/jenkins/appcenter.sh'
}
}
stage('local') {
steps {
// Starting in Xcode 9, we can run this test headless and
// in parallel with the other simulator tests - as long as
// we control the CalabashServer port. At the moment the
// the CI machine is running Xcode 8.3.3.
sh 'gtimeout --foreground --signal SIGKILL 74m bundle exec bin/test/xctest.rb'
sh 'bundle exec bin/test/cucumber.rb'
}
}
}
}
stage('publish') {
steps {
sh 'bin/ci/jenkins/s3-publish.sh release'
}
}
}
post {
always {
junit 'cucumber/reports/junit/*.xml'
}
aborted {
echo "Sending 'aborted' message to Slack"
slackSend (color: "${env.SLACK_COLOR_WARNING}",
message: "${env.PROJECT_NAME} [${env.GIT_BRANCH}] #${env.BUILD_NUMBER} *Aborted* after ${currentBuild.durationString.replace('and counting', '')}(<${env.BUILD_URL}|Open>)")
}
failure {
echo "Sending 'failed' message to Slack"
slackSend (color: "${env.SLACK_COLOR_DANGER}",
message: "${env.PROJECT_NAME} [${env.GIT_BRANCH}] #${env.BUILD_NUMBER} *Failed* after ${currentBuild.durationString.replace('and counting', '')}(<${env.BUILD_URL}|Open>)")
}
success {
echo "Sending 'success' message to Slack"
slackSend (color: "${env.SLACK_COLOR_GOOD}",
message: "${env.PROJECT_NAME} [${env.GIT_BRANCH}] #${env.BUILD_NUMBER} *Success* after ${currentBuild.durationString.replace('and counting', '')}(<${env.BUILD_URL}|Open>)")
}
}
}