一、关键点
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:- Remove
CODE_SIGN_RESOURCE_RULES_PATH=$(SDKROOT)/ResourceRules.plist
-
Find the
Find the lines including the following code in the script/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/PackageApplication
script and update it.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