Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Xcode Bot to run "on commit" for all branches of remote repository?

When creating an Xcode Bot in Xcode 6, it is linked to the current active branch in Xcode source control. There seems to be no supported way to change branches after creating the bot.

Xcode Service: Select Git Branch

I have set my bot to run "on commit". I find when I commit to that branch the bot immediately integrates the project. But when I commit to a different branch, the bot takes no action.

Ideally I would like a single Xcode Bot to look at all branches of the remote repository. When there is a new commit to any branch the bot and its tests should be run.

I do not want to create a new bot for each branch. Is there a solution?

Bug Report:
rdar://20154198

Developer Forum:
https://devforums.apple.com/thread/263490

like image 876
pkamb Avatar asked Feb 26 '15 23:02

pkamb


2 Answers

There is also https://github.com/modcloth-labs/XBotBuilder developed by the same creators of the tool @jeremy-fox. It will create a bot per Pull Request, and re-run the bot for every addition in the PR.

It seems to be in early stages and without documentation but the code seems to be well organized so wouldn't be hard to get it to work or change it's behavior to do what you want.

like image 82
Gus Avatar answered Sep 20 '22 23:09

Gus


For the moment we use a tool called Buildasaur (https://github.com/czechboy0/Buildasaur) to improve our CI-workflow. It's written in swift and helps to build/run/ delete bots automatically for one github repository, for example whenever a pullrequest was created or newer commits were pushed to the pullrequest. Actually it works fine on our Xcode Server 6.3. Unfortunately it works for just one repository at the same time. :-( We also hope, that Apple will implement such features soon.

like image 33
pkarstedt Avatar answered Sep 23 '22 23:09

pkarstedt