In Xcode [Server] 5.x when creating a bot we were able to specify which branch to check out for the remote when building. How could you achieve the same results in Xcode 6? The options don't seem to be available within Xcode when creating the bot, or from the browser when viewing it on the web.
2 Answers
After a some investigation it appears the only obvious way to select a different branch for a bot is to have that branch checked out at the time the bot is created. This can be done from within Xcode:
Source Control > [your project name] > Switch to Branch
After which you can create your bot which will check out this branch when integrating.
I really don't like this behaviour and have to assume there's a workaround for this
-
4I agree. The way of selecting a branch regardless of your current branch was much better.– ChrisOct 8, 2014 at 20:00
-
2Also it appears that a new build is kicked off regardless of which branch has been committed to, which feels wasteful. Has anyone else noticed this behaviour? Oct 14, 2014 at 20:18
-
Didn't see that one yet, we haven't done too many builds with this new server. Xc6 seems a little dumbed down from a build perspective IMO– NSTJOct 15, 2014 at 4:22
-
I guess the bots in XCode 6 are dependent on the schema we are currently using. If the schema is on a different branch, thats what the bot will do. Maybe we can edit that somehow? Oct 22, 2014 at 12:57
-
3@GeorgeSealy I can confirm your finding that a commit to a branch kicks off bots that are set to poll for commit changes. I'd hope (and expect) that Apple will bring back branch control. Failing that, clearly specify that bots live on the branch they're created on in the docs somewhere. Nov 20, 2014 at 15:42
In Xcode 7 you can now select the branch.
In Xcode 5 and 6 you can add the following to a "Before Integration" script.
git checkout NameOfYourBranch
-
Good call - and it's a better answer than mine IMO. Both still feel a bit hacky/clunky though.– NSTJApr 4, 2015 at 1:38
-
Saved me with this! thank you so much for this simple workaround. Apr 27, 2015 at 22:16
-
If you do that you need to launch the integration manually, the "on commit" can't work– KappeJun 23, 2015 at 15:54