Jenkins+ Xcode+ 蒲公英 实现IOS自动化打包和分发
直接入正题:
Screen Shot 2015-09-18 at 16.56.20.png
Mac上安装Jekins
jekins下载地址:http://jenkins-ci.org/ ,选择Mac 直接安装。安装成功后。访问http://localhost 是否可正常访问.
安装Jekins相关插件
xcode插件
2.https://wiki.jenkins-ci.org/display/JENKINS/XCode+Plugin#XcodePlugin-Installationguide
脚本执行插件
3.https://wiki.jenkins-ci.org/display/JENKINS/PostBuildScript+Plugin
git插件
4.https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin
IOS证书管理和修正
1.点击 Manage Jenkins-> [Keychains and Provisioning Profiles Management] 进入如下页面
Screen Shot 2015-09-18 at 15.49.30.png
2.点击choose File 并上传 当前登录用户的~/Library/Keychain/login.keychain文件.
上传成功后会出现:
Screen Shot 2015-09-18 at 15.55.05.png
点击Add Code Signing Identity添加对应的签名
3.上传Provisioning Profiles文件,xcode的profile存放在~/Library/MobileDevice/Provisioning Profiles/中,找到你要的profile,上传
Screen Shot 2015-09-18 at 16.04.46.png
这步很重要,如果证书出错请查看:http://www.cnblogs.com/qingjoin/p/3929493.html
新建项目
1.New Item -> 选择FreeStyle project
2.关联GIt
Screen Shot 2015-09-18 at 16.27.12.png
3.Xcode的相关配置
Screen Shot 2015-09-18 at 16.29.41.png
Screen Shot 2015-09-18 at 16.29.55.png
Screen Shot 2015-09-18 at 16.30.02.png
4.ipa上传到蒲公英和发送邮件
Screen Shot 2015-09-18 at 16.30.40.png
5.相关的python文件的地址为:
https://github.com/caiwenshu/CI_pgy/blob/master/pgy_upload_temp.py
该代码引用来自:http://www.cocoachina.com/ios/20150428/11698.html
原文 http://www.jianshu.com/p/371595ef08fe