博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to use Jenkins
阅读量:5028 次
发布时间:2019-06-12

本文共 3474 字,大约阅读时间需要 11 分钟。

一、关键点

1、how to start the build server? do i need to start some app to do this?

I don't believe so... The Jenkins service should start automatically.When I restart the build server in our office, I don't have to do anything to start the Jenkins service.

 

2、Jenkins configuration

You should be able to access the Jenkins config page by going to http://{build server IP}:8080. build server IP:可以从System Preference->Network参考当前build server的IP就好。

 

3、 if i want to stop the service, do you know how to do?

http:://{build server IP}:8080/manage and scroll to the bottom, you should see "Prepare for Shutdown"

 

4. Jenkins global scripts

The global scripts should be in /var/jenkins, and the platform-specific scripts are in /var/jenkins/ios and /var/jenkins/android. It looks like jenkins-develop and jenkins-local are the only "real" folders./var/jenkins is a symlink to jenkins-local.

 

5. do you know why jenkins know xcode-builder service?/var/jenkins/ios, just need like the folder structure?

I think because Jenkins uses xcodebuild under the hood to make builds for iOS (as well as for running  unit tests if enabled)

 

6. change provisioning profiles

 if you ever need to change provisioning profiles, you need to make sure to sign into the build server, open Xcode, and refresh the profiles

 

二、Jenkins build iOS app遇到问题解决方案

 

三、关于安装插件

所有插件链接: 

 

1. solve jenkins Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings were found.

 就是创建这样的目录结构/Users/Shared/Jenkins/Library/MobileDevice/Provisioning Profile,然后将需要用到的provisioning profile文件放到Provisioning Profile目录下。

另外,你可以查看一下keychain中,一般证书会被安装到login那个item中,需要将其copy一份到system中。

 

1. solve jenkins  ResourceRules.plist: cannot read resources

Found the fix !

Click on your project > Targets > Select your target > Build Settings >

Code Signing Resource Rules Path

and add :

$(SDKROOT)/ResourceRules.plist

MAC OX10.10后的版本已经不能这样修改了,因为已经被封掉了。这个问题真真是让我的脑神经震惊了一下下。另外,如果你想用jenkins打包生成的ipa包,直接上架到APP STORE,工程配置中Code Signing Resource Rules Path则不能有这个字段。所以,解决方法,可以参照此链接 :  其实做法如下:

I am the same boat as DongHui Li. I am using Jenkins too. If I remove CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist I am NOT able to build. And if I add it, I can build but NOT able to submit to Apple.

UPDATE -> I am able to build and upload to apple using Jenkins now.

What I did is: 

  1. Remove CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist
  2. Find the /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication script and update it.

    Find the lines including the following code in the script

    my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements,resource-rules", "--sign", $opt{ sign}, "--resource-rules=$destApp/ResourceRules.plist");

    change it to:

    my @codesign_args = ("/usr/bin/codesign", "--force", "--preserve-metadata=identifier,entitlements", "--sign", $opt{ sign});

 

1. solve 应用图标

Click on your project > Targets > Select your target > Info

加Icon file(或者CFBundleFileIcon), string, 例如我把其value写成Icon,则需要把Icon.png这个文件copy到这个bundle中

 

1. xcode-select

xcode-select --help可以查看一下它的常见用法。对于, switch这个功能有时候无法这种有效。可以尝试vi ~/.bash_profile这个文件,其中有设置xcode的环境变量。具体可以参照此link: 

同样,可以通过xcode来设置command line使用的xcode. Xcode->Preference->Locations->Command Line Tools

 

1. Mac os install jenkins 

转载于:https://www.cnblogs.com/ouyangfang/p/4794162.html

你可能感兴趣的文章
使用 GistBox 轻松组织和管理你的代码片段
查看>>
Skytte:一款令人印象深刻的 HTML5 射击游戏
查看>>
40个优秀的简约风格摄影作品欣赏
查看>>
推荐40个非常优秀的 jQuery 插件和教程【系列三】
查看>>
Nginx下搭建Nagios监控平台(转载)
查看>>
转-input file类型的value清空
查看>>
指针与const
查看>>
从MyEclipse到IntelliJ IDEA ——让你脱键盘,全键盘操作
查看>>
关于C++中的拷贝构造函数和赋值函数
查看>>
转-Spring 注解学习手札(七) 补遗——@ResponseBody,@RequestBody,@PathVariable
查看>>
网络流问题,及其代码
查看>>
Swift学习(3面向对象)
查看>>
Django自带的后台管理样式找不到的问题。
查看>>
jQuery基础与学习资源
查看>>
cocos2dx 内存管理
查看>>
python 学习笔记6(函数)
查看>>
新浪分享API应用的开发
查看>>
美国专利
查看>>
Windows Azure: 使用Blob的PutBlock实现大文件断点续传
查看>>
向集合中添加自定义类型--建议在自定义类型的时候要重写equals方法
查看>>