直接入正题:
Screen Shot 2015-09-18 at 16.56.20.pngMac上安装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.png2.点击choose File 并上传 当前登录用户的~/Library/Keychain/login.keychain文件.
上传成功后会出现:
点击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
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.png4.ipa上传到蒲公英和发送邮件
Screen Shot 2015-09-18 at 16.30.40.png5.相关的python文件的地址为:
https://github.com/caiwenshu/CI_pgy/blob/master/pgy_upload_temp.py
网友评论
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://gitee.com/asura_0/testItem.git # timeout=10
Fetching upstream changes from https://gitee.com/asura_0/testItem.git
> git --version # timeout=10
> git fetch --tags --progress https://gitee.com/asura_0/testItem.git +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/master 等,楼主遇到过吗,请指教,谢谢
[build] $ ditto -c -k --keepParent -rsrc /Users/Shared/Jenkins/Home/workspace/ds_project_new/build/IHome4Phone.app.dSYM /Users/Shared/Jenkins/Home/workspace/ds_project_new/build/jenkins-ds_project_new-25-dSYM.zip
[PostBuildScript] - Execution post build scripts.
[ds_project_new] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson1308126104959055853.sh
+ /usr/bin/python /Users/odymacserver/Desktop/shell/pgy_upload_temp.py
/usr/bin/python: can't open file '/Users/odymacserver/Desktop/shell/pgy_upload_temp.py': [Errno 13] Permission denied
Build step 'Execute a set of scripts' changed build result to FAILURE
Build step 'Execute a set of scripts' marked build as failure
Finished: FAILURE
Check dependencies
Code Sign error: No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching “iPhone Distribution: .” were found.
Warning: Multiple build commands for output file
我的代码是本地的,放在了workspace中,然后我尝试把钥匙串中的证书从登录copy到系统,但是仍然失败。依然是上面的错误信息。你可知道是哪里出了问题吗?
CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist
打包出来的release版在上传的时候会报错 ERROR ITMS-90339;
如果去掉这条,打包时报错
error: couldn't parse contents of '/Users/Shared/Jenkins/Home/jobs/App-Patient-IOS-Release/workspace/HBProjiect/Info.plist': The data couldn’t be read because it isn’t in the correct format.
** BUILD FAILED **
求教