与 Xcode Bots 的持续集成
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19650444/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Continuous integration with Xcode Bots
提问by Anil Varghese
I want to to do the continuous integration using Xcode bots. I have installed OSX Mavericks and Server(version 3). I am able to create bots using Xcode 5.0.1. While integrating it is successfully performing analyzing testing but always the final integration result is failure.
我想使用 Xcode 机器人进行持续集成。我已经安装了 OSX Mavericks 和 Server(版本 3)。我可以使用 Xcode 5.0.1 创建机器人。虽然集成它正在成功地执行分析测试,但最终的集成结果总是失败。
Integration failed. Unexpected internal server error. See the integration's logs for more details.`
集成失败。意外的内部服务器错误。有关更多详细信息,请参阅集成日志。`
I didnt understand anything from the server error logs.Its failing due to some wiki service related errors.
我不明白服务器错误日志中的任何内容。由于某些 wiki 服务相关错误,它失败了。
Can anyone help me?
谁能帮我?
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:233 7e026310 +0ms] didReceiveData
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:246 7e026310 +2ms] connectionDidFinishLoading
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:172 7e026310 +0ms] Out of runloop; request completed
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceProxy.m:79 7e026310 +0ms] Received successful response.
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Info>: [CSConfig.m:55 7e026310 +0ms] Reading plist at /Library/Server/Wiki/Config/collabd.plist
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [XCSBuildHelper.m:97 7e026310 +0ms] Updating bot run with GUID fc16d3af-093e-44aa-8a40-ebfef45bbbd9
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [XCSBuildHelper.m:102 7e026310 +0ms] Updating bot run (fc16d3af-093e-44aa-8a40-ebfef45bbbd9): {
guid = "fc16d3af-093e-44aa-8a40-ebfef45bbbd9";
status = failed;
subStatus = "internal-error";
}
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Info>: [CSConfig.m:55 7e026310 +0ms] Reading plist at /Library/Server/Wiki/Config/collabd.plist
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Info>: [CSConfig.m:55 7e026310 +0ms] Reading plist at /Library/Server/Wiki/Config/collabd.plist
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Info>: [CSRemoteServiceClient.m:151 7e026310 +0ms] Connecting to https://localhost:4443/svc to execute [https]Request{XCBotService.updateBotRun:({
guid = "fc16d3af-093e-44aa-8a40-ebfef45bbbd9";
status = failed;
subStatus = "internal-error";
})}
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:159 7e026310 +0ms] Secure, async request
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:169 7e026310 +0ms] Before runloop; request pending
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:223 7e026310 +157ms] didReceiveResponse
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:225 7e026310 +0ms] response=<NSHTTPURLResponse: 0x7fd24a5a7980> { URL: https://localhost:4443/svc } { status code: 200, headers {
"Accept-Ranges" = bytes;
"Content-Length" = 3700;
"Content-Type" = "x-apple/msgpack";
Date = "Tue, 29 Oct 2013 04:48:41 GMT";
Status = 200;
"X-Apple-collabd" = yes;
} }
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:233 7e026310 +0ms] didReceiveData
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:246 7e026310 +0ms] connectionDidFinishLoading
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:172 7e026310 +0ms] Out of runloop; request completed
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceProxy.m:79 7e026310 +0ms] Received successful response.
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [XCSBuildHelper.m:108 7e026310 +0ms] Updating bot with GUID 4e122aa2-56dd-4e3a-ad6e-25be1a65e657
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [XCSBuildHelper.m:117 7e026310 +0ms] Updating bot with latest bot run GUID key
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [XCSBuildHelper.m:124 7e026310 +0ms] Updating bot (4e122aa2-56dd-4e3a-ad6e-25be1a65e657): {
guid = "4e122aa2-56dd-4e3a-ad6e-25be1a65e657";
latestFailedBotRunGUID = "fc16d3af-093e-44aa-8a40-ebfef45bbbd9";
latestRunStatus = failed;
latestRunSubStatus = "internal-error";
}
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Info>: [CSConfig.m:55 7e026310 +0ms] Reading plist at /Library/Server/Wiki/Config/collabd.plist
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Info>: [CSConfig.m:55 7e026310 +0ms] Reading plist at /Library/Server/Wiki/Config/collabd.plist
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Info>: [CSRemoteServiceClient.m:151 7e026310 +0ms] Connecting to https://localhost:4443/svc to execute [https]Request{XCBotService.updateBot:({
guid = "4e122aa2-56dd-4e3a-ad6e-25be1a65e657";
latestFailedBotRunGUID = "fc16d3af-093e-44aa-8a40-ebfef45bbbd9";
latestRunStatus = failed;
latestRunSubStatus = "internal-error";
})}
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:159 7e026310 +0ms] Secure, async request
Oct 29 10:18:41 AnilV-InetliMac.local xcsbuildd[11285] <Debug>: [CSRemoteServiceClient.m:169 7e026310 +0ms] Before runloop; request pending
回答by gamma
The problem seems to be that XCode5 Bots do not know how to use pure svn. You have to use svn+ssh.
问题似乎是 XCode5 Bots 不知道如何使用纯 svn。你必须使用 svn+ssh。
[UPDATE]You could also use git ... synchronized with your SVN. The workflow ist slightly different, but it works great.
[更新]您也可以使用 git ... 与您的 SVN 同步。工作流程略有不同,但效果很好。
I found this today: subgit
我今天发现了这个:subgit
It perfectly integrates into GIT and SVN, you can set up GIT repositories in Xcode Server and upgrade them with subgit - they will both stay in sync. (took me about half an hour to completely understand how it works)
它完美地集成到 GIT 和 SVN,您可以在 Xcode Server 中设置 GIT 存储库并使用 subgit 升级它们 - 它们将保持同步。(我花了大约半小时才完全了解它是如何工作的)
Best of all: a 10 seat license (meaning 10 collaborator via subgit) is totally free (and quite enough for my use case).
最重要的是:10 个席位的许可证(意味着通过 subgit 的 10 个合作者)是完全免费的(对于我的用例来说已经足够了)。
[PREVIOUS ANSWER]I made a simple solution that involves an SSH Server on the SVN Server machine. I think it does not matter which one, but I'm currently using Cygwin.
[以前的回答]我做了一个简单的解决方案,涉及到 SVN 服务器机器上的 SSH 服务器。我认为哪个并不重要,但我目前正在使用 Cygwin。
In the /etc/sshd_config you need to add a subsystem
在 /etc/sshd_config 你需要添加一个子系统
Subsystem "svnserve -t" /etc/svnserve-proxy
Subsystem "svnserve -t" /etc/svnserve-proxy
You need to create the file /etc/svnserve-proxy
您需要创建文件 /etc/svnserve-proxy
cat > /etc/svnserve-proxy
#!/bin/bash
svnserve -t -r <repository>
You have to modify the svnserve
command and repository
respectively.
On your local computer you have to modify the file ~/.subversion/config
and add a [tunnels]
line:
您必须分别修改svnserve
命令和repository
。在本地计算机上,您必须修改文件~/.subversion/config
并添加[tunnels]
一行:
[tunnels]
ssh = $SVN_SSH ssh -v -l <username> -s
username
is the name of the user you want to authenticate with.
This solution is quick and dirty and does not allow for different users to authenticate. In addition, Xcode needs to use the same username on your local machine and the Bot-Server. It is quite possible that you have to create a _teamsuser
home directory and put an subversion/config in there as well.
username
是您要进行身份验证的用户的名称。此解决方案快速而肮脏,并且不允许不同的用户进行身份验证。此外,Xcode 需要在您的本地机器和 Bot-Server 上使用相同的用户名。您很有可能必须创建一个_teamsuser
主目录并在其中放置一个 subversion/config。
An alternative would be to use public-keys (As the bot server already creates) You can then put these into authorized_keys
and put a command in front:
另一种方法是使用公钥(因为机器人服务器已经创建了)然后您可以将它们放入authorized_keys
并在前面放置一个命令:
command="svnserve -t -r <repository> --tunnel-user=<user>" rsa-ssh AAA
回答by Truth
I had a similar problem. In my case it was issue accessing the source code repository. The OSX Server had DNS issue which was preventing it from reaching the host. Can you check if you are able to access your source code repository?
我有一个类似的问题。就我而言,访问源代码存储库是个问题。OSX 服务器有 DNS 问题,阻止它到达主机。你能检查一下你是否能够访问你的源代码存储库吗?
回答by RayofHope
With Xcode 9 apple brings ease to continuous integration with Xcode bots.
借助 Xcode 9,苹果可以轻松地与 Xcode 机器人进行持续集成。
Xcode Server built-in. Continuous integration bots can be run on any Mac with Xcode 9, no need to install macOS Server.
内置 Xcode 服务器。持续集成机器人可以在任何装有 Xcode 9 的 Mac 上运行,无需安装 macOS 服务器。
I found very good article explaining how to configure it with Xcode 9.
我找到了很好的文章,解释了如何使用 Xcode 9 配置它。
Xcode9 - Xcode server comprehensive iOS continuous integration