1. 安装jenkins
$ brew install Jenkins
第一步需要安装至少java1.8 ,如果没有安装会有提示,java安装地址
1.1 命令行启动Jenkins
$ jenkins
如果出现 下图中的 Jenkins is fully up and running
代表启动完成,
![](https://img.haomeiwen.com/i1612683/f2014155ba2689c8.png)
然后浏览器中输入 http://localhost:8080/
会出现下面的管理员密码, 位置在 红字那一行,复制路径 CMD + G
前往文件夹,然后得到的password输入到Administrator password
中
![](https://img.haomeiwen.com/i1612683/9051112b410e2e32.png)
搭建过程中遇到的问题汇总
问题1.
ERROR: Timeout after 10 minutes
ERROR: Error fetching remote repo 'origin'
解决:权限问题, 用户名
, 密码
填写github 用户名,密码, 如果代码库放到gitlab 上,需要填写gitlab的用户名和密码
![](https://img.haomeiwen.com/i1612683/4018c00f19f245c0.png)
如果使用的ssh的地址, 需要类型选择 SSH username with private key
, 私钥通过下面命令查看
$ cd ~/.ssh/
$ cat id_rsa
![](https://img.haomeiwen.com/i1612683/d0bb593676d2809d.png)
问题2.
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
![](https://img.haomeiwen.com/i1612683/7788d57b530ef19c.png)
- master 改成 main
问题3. error: MGTestJenkinsBeta has conflicting provisioning settings. MGTestJenkinsBeta is automatically signed, but code signing identity Apple Distribution: National Center For Open & Distance Education Limited Company (SAD9GVXX85) has been manually specified. Set the code signing identity value to "Apple Development" in the build settings editor, or switch to manual signing in the Signing & Capabilities editor. (in target 'MGTestJenkinsBeta' from project 'MGTestJenkins')
Xcode 中选中的自动签名(Automaticall manager signing
),而在配置脚本的时候设置了手动配置的签名,把手动配置的签名去掉就行了。
问题4. error: Couldn't load -exportOptionsPlist: The file “ExportOptions_beta.plist” couldn’t be opened because there is no such file.
需要配置ExportOptions_beta.plist, 并且路径要指定的正确,ExportOptions_beta.plist可以先手动打包导出一个修改名字
![](https://img.haomeiwen.com/i1612683/59bdbb69b760bab3.png)
![](https://img.haomeiwen.com/i1612683/af12a105430372d5.png)
网友评论