Continuous integration with Xcode Bots
Asked Answered
C

3

10

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.

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.

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
Crosslegged answered 29/10, 2013 at 5:34 Comment(4)
What kind of repository do you use? I had the problem using a plain SVN repo. But I solved it by enabling svn+ssh and public key authentication.Aspersion
@Aspersion i'am using hosted SVN repo(requires password authentication) It is centralised repository that my company providingCrosslegged
Yup, had about the same setup. Only way was to figure out how to make svn+ssh work. I installed an SSHService (Cygwin), made an authentication scheme for PublicKey auth for just the user that was running with Xcode and my local user. I have not yet figured out how to do this with password auth. If you want I can create an answer with the full descriptionAspersion
Sure.. can you post an answer by describing step by step procedure to setup svn+ssh to workCrosslegged
A
9

The problem seems to be that XCode5 Bots do not know how to use pure svn. You have to use svn+ssh.

[UPDATE] You could also use git ... synchronized with your SVN. The workflow ist slightly different, but it works great.

I found this today: 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)

Best of all: a 10 seat license (meaning 10 collaborator via subgit) is totally free (and quite enough for my use case).

[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.

In the /etc/sshd_config you need to add a subsystem

Subsystem "svnserve -t" /etc/svnserve-proxy

You need to create the file /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:

[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.

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:

command="svnserve -t -r <repository> --tunnel-user=<user>" rsa-ssh AAA
Aspersion answered 13/11, 2013 at 15:12 Comment(2)
I have been trying to get this setup with public keys, but can't create the bot in xcode! I get stuck setting up the repo/account: Xcode -> Preferences -> Accounts tab Add repo Enter svn+ssh address Type Subversion It asks for username password but there is nowhere to put in the key. On the server setup side you can actually paste in the key text. When I hit Add it says "Verifying credentials..." then just shows the ssh server banner in a big popup window. -update OMG I DELETED THE BANNER AND ITS AUTHENTICATINGTantalizing
+1 for updating the answer and adding subgit path. git has git svn to do that as well. atlassian.com/git/tutorials/migrating-overviewRambouillet
S
1

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?

Selfidentity answered 29/10, 2013 at 17:4 Comment(2)
How to check that? How you resolved your issue. My repository is proxy enabled and it requires authentication. I have given required credential to the OSX server. I think it is able to access the repository since integration is failing only at last stage after analysing and testing. Final result is always failureCrosslegged
I see. Can you paste what it shows in your integration log? You will find it on your bot details page after you have selected your recent run on the left.Selfidentity
V
0

With Xcode 9 apple brings ease to continuous integration with Xcode bots.

Xcode Server built-in. Continuous integration bots can be run on any Mac with Xcode 9, no need to install macOS Server.

I found very good article explaining how to configure it with Xcode 9.

Xcode9 - Xcode server comprehensive iOS continuous integration

Vulnerary answered 13/6, 2017 at 7:26 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.