This repository has been archived by the owner on May 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
49 lines (48 loc) · 1.82 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
pipeline {
agent any
environment {
GIT = credentials('github')
}
stages {
stage('Prerequisites') {
environment {
GEONOSIS_USER_PASSWORD = credentials('GeonosisUserPassword')
}
steps {
sh 'security unlock-keychain -p ${GEONOSIS_USER_PASSWORD} login.keychain'
withEnv(["PATH+=/usr/local/bin", "LANG=en_US.UTF-8"]) {
sh '/usr/local/bin/pod install --project-directory=GiniVisionExample/'
}
}
post {
failure {
/* try to repo update just in case an outdated repo is the cause for the failed build so it's ready for the next */
lock('refs/remotes/origin/master') {
sh '/usr/local/bin/pod repo update'
}
}
}
}
stage('Build') {
environment {
CLIENT_ID = credentials('VisionShowcaseClientID')
CLIENT_PASSWORD = credentials('VisionShowcaseClientPassword')
}
steps {
sh 'scripts/create_keys_file.sh ${CLIENT_ID} ${CLIENT_PASSWORD}'
sh 'xcodebuild -workspace GiniVisionExample/GiniVisionExample.xcworkspace -scheme "GiniVisionExample" -destination \'platform=iOS Simulator,name=iPhone 11\''
}
}
stage('Unit tests') {
environment {
CLIENT_ID = credentials('VisionShowcaseClientID')
CLIENT_PASSWORD = credentials('VisionShowcaseClientPassword')
}
steps {
sh 'scripts/create_keys_file.sh ${CLIENT_ID} ${CLIENT_PASSWORD}'
sh 'xcodebuild build-for-testing -workspace GiniVisionExample/GiniVisionExample.xcworkspace -scheme "GiniVisionExample" -destination \'platform=iOS Simulator,name=iPhone 11\''
sh 'xcodebuild test-without-building -workspace GiniVisionExample/GiniVisionExample.xcworkspace -scheme "GiniVisionExample" -destination \'platform=iOS Simulator,name=iPhone 11\''
}
}
}
}