Scriptable Interface to Xcode Server for adding Remote Repositories
| Originator: | david.anderson | ||
| Number: | rdar://15524905 | Date Originated: | 21-Nov-2013 09:31 AM |
| Status: | Open | Resolved: | |
| Product: | Xcode Server | Product Version: | Mavericks Server.app v3.0.1 (13S2015) |
| Classification: | Reproducible: |
Summary: Our organization has a large number (~300) of repositories containing code for static libraries, iOS and Mac apps. We have been investigating the opportunity to use Xcode Server to perform regular static analysis of our code-bases as well as to further our adoption of test driven development along with continuous integration. We are also excited at the possibility of using Xcode-server-created .xcarchive files as part of our build and distribution system for internal development builds. Unfortunately, having more than a handful of repos (all of which are hosted on GitHub and accessed using SSH keys), the interface is not conducive to easily adding new or existing remote repositories. We have attempted to script Server.app using Applescript, have attempted to determine where Server.app stores the remote repository configurations, and have attempted to find a command line interface but none of these approaches have given us a scriptable mechanism for adding remote repositories. We also create new projects/repositories and configure our existing build system via a command line script, and ideally we would like to be able to configure the Xcode service as part of this same new project generator script. (We create a new project, repo and build system configuration about 2 times each week.) Steps to Reproduce: Install Mavericks Server and attempt to add Remote Repositories to the Xcode Service without spending approximately 25 hours performing the individual configuration. Expected Results: Ideally we would like to be able to commit the Xcode Service configuration to git and clone the configuration on more than one Xcode Server installation, providing redundancy and the ability to have the configuration backed up. As we have been unable to find the root configuration of remote repositories, we suspect that they may be stored in the keychain for the _teamserver user. This makes sense in the fact that each repository configuration includes a public/private key pair (or username/password) and naturally we're not interested in committing private keys to a repository, so the use of keychain is reasonable and the idea of cloning full configurations may not be reasonable. (What about exporting the current configuration except for the public/private keys and having the ability to import the configuration?) If we're unable to clone/import/export the configuration, then it would be desirable to have a command line interface to the Xcode service on Mavericks Server. Command line arguments could be used to indicate whether a local or remote repository is desired, the name, url, authentication mechanism and credentials. The command line interface could output the public ssh key, or ideally accept and *existing* public private ssh key pair. (We're not very exited at the need to add a deploy key to every repo and would prefer to be able to tell the Xcode service the *existing* SSH key pair we would like to use.) Worst case, if none of the above are available, performing UI scripting using Apple Script would be acceptable. The current applescript dictionary for Server.app is very limited. Actual Results: Someone must manually add a large number of existing repositories, update github with the generated public ssh key, and continue manually updating the Xcode service each time a new repo and project is created. Version: Xcode 5.0.2 (5A3005) Mavericks Server.app v3.0.1 (13S2015) Notes: Configuration: Mavericks Server.app v3.0.1 (13S2015) Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!