Repository navigation
Expand file tree
/
Copy pathiOS-Config.xml
More file actions
39 lines (33 loc) · 2.08 KB
/
Copy pathiOS-Config.xml
File metadata and controls
39 lines (33 loc) · 2.08 KB
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
<?xml version='1.0' encoding='UTF-8'?>
<flow-definition plugin="workflow-job@2.4">
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties>
<org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
<triggers/>
</org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty>
</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="workflow-cps@2.10">
<script>
node{
stage 'Git Pull'
git credentialsId: 'ADD YOUR CRED ID', url: 'git@git.tom.redhatmobile.com:jnakfour/Innovation-Lab-Native-iOS-Native-iOS--Objective-C--hello-world-app.git'
stage 'Build And Archive ipa'
sh 'date +%Y-%m-%d > outFile'
def curDate = readFile('outFile').trim()
sh '/usr/local/bin/pod install'
sh 'mkdir -p /Users/Shared/Jenkins/Home/workspace/iOSBuildAndTestPipeline/DerivedData/artifacts'
sh '/usr/bin/xcodebuild -scheme helloworld-ios-app -workspace helloworld-ios-app.xcworkspace -configuration Debug clean build archive CONFIGURATION_BUILD_DIR=/Users/Shared/Jenkins/Home/workspace/iOSBuildAndTestPipeline/DerivedData'
sh "/usr/bin/xcrun -sdk iphoneos PackageApplication -v /Users/Shared/Jenkins/Home/workspace/iOSBuildAndTestPipeline/DerivedData/helloworld-ios-app.app -o /Users/Shared/Jenkins/Home/workspace/iOSBuildAndTestPipeline/DerivedData/artifacts/${curDate}.ipa"
stage 'Unit Testing'
sh'/usr/bin/xcodebuild -scheme helloworld-ios-app -sdk iphonesimulator -workspace helloworld-ios-app.xcworkspace -configuration Debug build test -destination "platform=iOS Simulator,name=iPhone 6s,OS=9.3" | /usr/local/bin/ocunit2junit'
stage 'Archive Artifact'
archive 'DerivedData/artifacts/*.ipa'
stage 'Publish JUnit Test'
step([$class: 'JUnitResultArchiver', testResults: 'test-reports/*.xml'])
}</script>
<sandbox>true</sandbox>
</definition>
<triggers/>
</flow-definition>