Jenkins-iOS自动构建

1.xCode Plugin插件(必要)


2.Credentials设置Git的用户名密码


3.主界面->系统管理->Keychains and Provisioning Profiles Management配置Keychains

拷贝/Library/keychains/login.keychain到桌面,上传login.keychain

添加Identites iPhone Distribution: TuoTianWeiYe(Beijing) Financial Information Service Co., Ltd.(MYKFH8D75G)

iPhone Developer: Kong LingShan (K3A344KMZ2)

添加Provisioning Profiles文件目录/Users/alankong/Library/MobileDevice/Provisioning Profiles


4..建立自由风格的项目

设置Project url https://github.com/tuotiansudai/tuotian_iOS/

设置代码仓库Repositories https://github.com/tuotiansudai/tuotian_iOS.git和分支develop

Poll SCM H/10 * * * *(10分钟拉去一次代码,有改动则构建)


5.构建环境

选择Keychains and Code Signing Identities(子项目自动填写?)


6.构建

填写Target tuotianClientConfigurationDebug or Release


Execute shell 打包.ipa文件并上传到蒲公英(根目录为工程目录)

xcrun -sdk iphoneos PackageApplication ./build/Debug-iphoneos/tuotianClient.app -o ~/Documents/tuotianClient.ipa

uKey=fd0d765d2504cxxxx64332746f50fbbd

#蒲公英上的API Key

apiKey=d79ec7b013cxxxx28908f958f27cce53

#要上传的ipa文件路径

IPA_PATH=~/Documents/tuotianClient.ipa

#执行上传至蒲公英的命令

echo "++++++++++++++upload+++++++++++++"

curl -F "file=@${IPA_PATH}" -F "uKey=${uKey}" -F "_api_key=${apiKey}" http://www.pgyer.com/apiv1/app/upload


7.E-mail Notification

构建失败发送邮件 空格隔开

必须先设置smtp发件服务器

主目录->系统设置->邮件通知(SMTP服务器smtp.gmail.com,使用SMTP认证用户名:kongglin@gmail.com,密码:RainxxxxSMTP端口465)


8.远程slave构建注意事项

1)勾选 Restrict where this project can be run并填写slave标签

2)解锁keychainCode signing & OS X keychain options->勾选Unlock Keychain,填写路径/Users/ttsd/Library/Keychains/login.keychain-db和机器登录密码


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值