[Jenkins]IOS构建机配置记录

-------------------

如需转载,请注明出处

-------------------

随着业务量和开发人员的递增,IOS构建每天都会排队,影响研发效率。随购买了新的垃圾桶,进行配置。

 

一、 Mac远程管理

设置-节能,设置成以下状态,确保垃圾桶放入机房后,能随时远程调试。

二、打开共享

选中“远程管理”和“远程登录”,允许访问处设置特定用户(比如有权限登录这台机器的账户)。

三、Git环境配置

默认自带git,只需要生成SSH Key,并添加到gitlab的SSH key下即可。

1. git自带的帮助文档已经写明了如何生成。

命令如下:一路回车即可。

localhost:~ qa$ ssh-keygen -t rsa -C "feedback@xxx.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/qa/.ssh/id_rsa):
Created directory '/Users/qa/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/qa/.ssh/id_rsa.
Your public key has been saved in /Users/qa/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:Gi1bWwlpr2hr2MBKCnD0FjW+Y4+iHMHSzbeLQ1gmHTY feedback@xxx.com
The key's randomart image is:
+---[RSA 2048]----+
|     .o          |
|  . E. . .       |
| . + +. +        |
|.ooo*  + o .     |
|o.+Bo B S +      |
|..o.+o % +       |
|.o.o.+B +        |
|...oo+oo         |
|  o .oo          |
+----[SHA256]-----+

2. 进入ssh文件夹,复制公钥到gitlab

cat ~/.ssh/id_rsa.pub 

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxLc+8YucHmXMuVYSh2pG7EYOTZaAidLlsWql9yv1QTXIpG6gcFlFT95iYZjsZBH678mN66xgu+Oz1MV+RCrO1XqV4/rLcjgGCmmPGPINIPy/+s5oJD5qfyQprJMniiiLiv13SaOY1GmsOfN2IXHABQNK+qAxdPAp2rnY7rg8IWrltNfG6qdeL/Emlpg9hZwJ6nQZj2kU4Vbqd0xzzXuUgBRd+amDhgta5VtRYtpUqilQISjTbC1xIBOoMtrlkpEl+9YKbc0JNjPzL7iJjrpZb2Z4LB4fZW+nb feedback@xxxx.com

添加到这里

3. clone gitlab里的项目,第一次需添加到key fingerprint到known hosts里。

localhost: qa$ git clone git@git.xxx.com:ios/xxx-ios.git
Cloning into 'xxx-ios'...
The authenticity of host 'git.xxx.com (10.10.130.xx)' can't be established.
ECDSA key fingerprint is SHA256:Vc52E7NVq6CODfO8mVMtNhv7Tkv86LZ86666666.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git.xxxx.com,10.10.130.xx' (ECDSA) to the list of known hosts.
remote: Counting objects: 284582, done.
remote: Compressing objects: 100% (70743/70743), done.
remote: Total 284582 (delta 216709), reused 276125 (delta 210812)
Receiving objects: 100% (284582/284582), 926.49 MiB | 731.00 KiB/s, done.
Resolving deltas: 100% (216709/216709), done.
Checking out files: 100% (7295/7295), done.

格式如下:

localhost:~ qa$ cat ~/.ssh/known_hosts
git.xxxxx.com,10.10.130.xx ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBGZgdcSEtfhdP83mlq1WOUlByl5zT4Mxn2SrH/EydDTO32reFKwUgAVOnHC0qVXIpp1Cup//lalalalal

 

四、安装Xcode

1. 可通过Apple store安装最新版xcode。

若需要老版本xcode可登录http://developer.apple.com/download/more 进行下载。

比方说,我需要下载xcode9.2。

2. 安装完成后Enable 开发者模式

3. 登录账号

Xcode - Preferences -Account 登录账号

4. 从其他构建机器导出证书并安装

因为证书是从官网申请的唯一证书,若在此机器上生成新的证书,将无法进行构建

安装

 

再次构建后,成功,cheers~

 

posted @ 2018-09-13 13:54  疲惫的豆豆  阅读(571)  评论(0编辑  收藏  举报