美文网首页Jinkens
Jenkins + SVN + Cocoapods 实现iOS自

Jenkins + SVN + Cocoapods 实现iOS自

作者: coderTian | 来源:发表于2016-05-31 15:03 被阅读755次

    安装Jenkins

    推荐使用命令行安装

    1.安装jenkins

    brew install jenkins

    Paste_Image.png

    2.启动jenkins

    jenkins

    Paste_Image.png
    如果没安装homebrew,先安装homebrew
    3.启动完成,地址为:http://localhost:8080/

    配置Jenkins

    admin 密码(个人感觉还是记一下比较好,在jenkins启动时候可以看到)

    Paste_Image.png

    然后接下来就是安装需要的插件了,直接选择默认的就好了
    进入jenkins之后还可以安装袭击需要的插件,推荐

    Paste_Image.png

    Xcode integration :用于读取Xcode中项目配置
    Post-Build Script Plug-in:这个插件的功能主要是用于在build后执行相关脚本
    Keychains and Provisioning Profiles Management:用于钥匙串

    证书配置

    1.点击 Manage Jenkins-> [Keychains and Provisioning Profiles Management] 进入如下页面

    Paste_Image.png Paste_Image.png

    2.点击choose File 并上传 当前登录用户的~/Library/Keychain/login.keychain文件.上传成功后会出现:

    Paste_Image.png

    3.上传Provisioning Profiles文件,xcode的profile存放在~/Library/MobileDevice/Provisioning Profiles/中,找到你要的profile,上传

    Paste_Image.png

    新建一个项目

    1.点击左侧工具栏"新建",选择第一项"构建一个自由风格的软件项目"

    Paste_Image.png

    2.基本配置

    Paste_Image.png

    3.源码管理(这里使用SVN)

    Paste_Image.png

    4.定时打包


    Paste_Image.png

    5.执行Cocoapods 更新脚本

    Paste_Image.png

    6.读取Xcode 设置

    Paste_Image.png Paste_Image.png Paste_Image.png

    7.保存配置之后,去构建自己的项目

    Paste_Image.png

    8.通过Console output查看日志,也可以从中查找错误

    Paste_Image.png

    9.出现success的标志就意味着打包成功了,可以根据显示的路径4查看打出的ipa文件

    Paste_Image.png

    10.构建过程中如果提示ResourceRules.plist的错误需要在xcode工程里添加$(SDKROOT)/ResourceRules.plist

    Paste_Image.png

    相关文章

      网友评论

      • 虫子_Gray:Verify final result code for completed build operation
        Build operation failed without specifying any errors. Individual build tasks may have failed for unknown reasons.
        One possible cause is if there are too many (possibly zombie) processes; in this case, rebooting may fix the problem.
        Some individual build task failures (up to 12) may be listed below.

        ** ARCHIVE FAILED **


        The following build commands failed:
        SymLink /Users/chongzi/Desktop/测试版/Release-iphoneos/JSPatch/JSPatch.framework /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/ZhiYiDoctor-doquqrkgenzgnaefebppcozzlery/Build/Intermediates/ArchiveIntermediates/ZhiYiDoctorTest/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/JSPatch.framework
        (1 failure)
        请问楼主 这个报错 怎么解决?
      • 南调江南:+ pod install --verbose --no-repo-update
        /Users/Shared/Jenkins/tmp/hudson3396429833498723908.sh: line 2: pod: command not found
        Build step 'Execute shell' marked build as failure
        Finished: FAILURE
        你好,请问这个是什么错误?
        vision_colion:层主解决了么?我也碰到这个问题
        暴走小鱼人:我也是报了上面的错误,博主能帮看看是什么原因吗?
        coderTian:你的工程里面有pod依赖吗

      本文标题:Jenkins + SVN + Cocoapods 实现iOS自

      本文链接:https://www.haomeiwen.com/subject/qpicdttx.html