美文网首页
iOS + Jenkins持续集成

iOS + Jenkins持续集成

作者: 何何何欣宇 | 来源:发表于2018-05-29 20:02 被阅读40次

注意:我使用的是cocoapods,导致下面的配置和非cocoapods可能会有不同

1 在https://jenkins.io官网首页下载 jenkins

2 下载JDK(http://www.oracle.com/technetwork/java/javase/downloads/index.html)

3 配置完成后开始安装,账号安装流程百度一下就有,这个简单

4 打开localhost:8080 默认启动Jenkins 能看到就说明成功了

5 系统管理 -> 管理插件,完成基本的git等插件

6 keychains and Profiles Management -> 上传keychains 和 provision profiles的路径;

    上传keychain:找不到文件可以: 资源库-> keychains 复制出来再上传;

                                Code Signing Identify:如下图、

Code Signing Identify

7 构建项目并配置:

    1 General:项目名称

    2 源码管理:需要注意的是 如果是用ssh则需要配合Credentials中UserName with Private key

UserName with Private key

    3 branches to build:需要编译的分支,比如origin/develop则填入,*/develop

    4 如果使用了submodules管理方式需要选中:Recurisively update submodules(获取代码)和 use credentials from default remote of parent repository(解决获取submodule时失败或无权限问题),如下图

submodule相关配置

    5 构建:选择 Execute shell 和 Xcode,并且保证顺序,因为需要先执行Execute shell脚本

        1 )在command中输入如下命令(如果pod不在主目录下,需要手动cd到相关文件夹)

command

    6 Advanced Xcode build options:

       填写:Xcode Schema File、Xcode Workspace File、Build output directory(选填)即可

相关文章

网友评论

      本文标题:iOS + Jenkins持续集成

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