jenkins 自用配置

打开 jenkins 配置信息

open ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist

//clean项目
//构建项目
#!/bin/bash -l
xcodebuild clean -project AutoBuild.xcodeproj -scheme AutoBuild
xcodebuild build -project AutoBuild.xcodeproj -scheme AutoBuild

//安装 pod
#!/bin/bash -l
xcodebuild clean -workspace YaoYD.xcworkspace -scheme YaoYD
pod update --verbose --no-repo-update
xcodebuild -workspace YaoYD.xcworkspace -scheme YaoYD build


//打包前清空相关目录信息
#!/bin/bash -l
#xcodebuild archive -workspace YaoYD.xcworkspace -scheme YaoYD  -archivePath  archive/jenkins/ddd


#filename="YaoYD_`date +%y%m%d`.xml"
#xcodebuild -exportArchive -archivePath archive/jenkins/ddd.xcarchive -exportPath ~/Desktop/$filename -sdk iphoneos CODE_SIGN_RESOURCE_RULES_PATH='$(SDKROOT)/ResourceRules.plist'
#filename="YaoYD_`date +%y%m%d`.xml"
echo "CD report/"
cd report/
echo "ls"
ls
echo "rm *"
rm *
echo "ls"
ls
echo "ls end"
cd ..
echo $PWD

//定义文件名,生成测试文件
#!/bin/bash -l
echo $PWD
filename="YaoYD_`date +%y%m%d`.xml"
echo $filename
echo "ls report/"  
  ls report/
echo "ls report-----"
xctool -workspace YaoYD.xcworkspace -scheme YaoYD -configuration Debug  -sdk iphonesimulator -launch-timeout 500 -reporter junit:report/$filename run-tests
echo '---END---'

你可能感兴趣的:(jenkins 自用配置)