{"action":"created","issue":{"url":"https://api.github.com/repos/gocd/gocd/issues/1133","labels_url":"https://api.github.com/repos/gocd/gocd/issues/1133/labels{/name}","comments_url":"https://api.github.com/repos/gocd/gocd/issues/1133/comments","events_url":"https://api.github.com/repos/gocd/gocd/issues/1133/events","html_url":"https://github.com/gocd/gocd/issues/1133","id":77045258,"number":1133,"title":"Feature: pipeline configuration from source control","user":{"login":"tomzo","id":5710970,"avatar_url":"https://avatars.githubusercontent.com/u/5710970?v=3","gravatar_id":"","url":"https://api.github.com/users/tomzo","html_url":"https://github.com/tomzo","followers_url":"https://api.github.com/users/tomzo/followers","following_url":"https://api.github.com/users/tomzo/following{/other_user}","gists_url":"https://api.github.com/users/tomzo/gists{/gist_id}","starred_url":"https://api.github.com/users/tomzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomzo/subscriptions","organizations_url":"https://api.github.com/users/tomzo/orgs","repos_url":"https://api.github.com/users/tomzo/repos","events_url":"https://api.github.com/users/tomzo/events{/privacy}","received_events_url":"https://api.github.com/users/tomzo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-05-16T13:57:23Z","updated_at":"2015-05-29T13:37:35Z","closed_at":null,"body":"### Motivation\r\nBeing a big fan of keeping all project-related code in its source code repository I would really like to be able to **declare pipeline configuration in the source code of each individual project** instead of the global cruise-config.xml.\r\nMany people will agree that **each project's code should know how to build and test itself**. Following this concept it should also know how to *CI-itself*.\r\n### Problem\r\nCurrently when all go configuration is in global configuration file on server we basically end up with 2 sources of projects configuration - one being git repository, the other a file on go server. There are lots of scenarios when new changes in git repo will cause the build to break because they expected different pipeline configuration. Or rather pipeline configuration expected the older git repo contents. \r\n### Concept\r\nIn order to avoid such conflicts probably the `<pipeline>` section should never be in the global cruise-config.xml, instead go-server should configure pipelines after pooling from source repositories.\r\n\r\n### Final notes\r\n * Is anyone interested in such feature or am I crazy? Please provide some feedback on how would you like to see this?\r\n * How do you (or your organization) handle the problem described above?\r\n * I am not a *gocd developer* and I am unfamiliar with its source code or development process. But I learn fast and I am very determined to get this done.\r\n * I would like to kindly ask the core developers of gocd to the right direction on getting this implemented. What components will need to be updated? How invasive would it be? Can configuration loading and applying be easily replaced to the general schema I described above."},"comment":{"url":"https://api.github.com/repos/gocd/gocd/issues/comments/106804250","html_url":"https://github.com/gocd/gocd/issues/1133#issuecomment-106804250","issue_url":"https://api.github.com/repos/gocd/gocd/issues/1133","id":106804250,"user":{"login":"arvindsv","id":172235,"avatar_url":"https://avatars.githubusercontent.com/u/172235?v=3","gravatar_id":"","url":"https://api.github.com/users/arvindsv","html_url":"https://github.com/arvindsv","followers_url":"https://api.github.com/users/arvindsv/followers","following_url":"https://api.github.com/users/arvindsv/following{/other_user}","gists_url":"https://api.github.com/users/arvindsv/gists{/gist_id}","starred_url":"https://api.github.com/users/arvindsv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arvindsv/subscriptions","organizations_url":"https://api.github.com/users/arvindsv/orgs","repos_url":"https://api.github.com/users/arvindsv/repos","events_url":"https://api.github.com/users/arvindsv/events{/privacy}","received_events_url":"https://api.github.com/users/arvindsv/received_events","type":"User","site_admin":false},"created_at":"2015-05-29T13:37:34Z","updated_at":"2015-05-29T13:37:34Z","body":"> ... then could it be validated as the first thing a build does?\r\n\r\nI agree. I think it should, and it probably would be implemented that way.\r\n\r\nIf you look at the original post, @tomzo said:\r\n> In order to avoid such conflicts probably the <pipeline> section should never be in the global cruise-config.xml, instead go-server should configure pipelines after pooling from source repositories.\r\n\r\nThat's what I was talking about. If ```<pipeline>``` is not in the config, then maybe the config has something like:\r\n\r\n```\r\n<config>\r\n    ...\r\n    <pipeline-repo url=\"...\" type=\"git\">\r\n   ...\r\n```\r\n\r\nI don't know. It's just a guess. That's why I mentioned needing more clarity.\r\n\r\nBut, at a high level, this is about the \"pluggability\" of the whole config, essentially. That can be done, if we have an abstract provider interface. If we have that, then making it read from a repository of pipeline-level declaration files, instead of one XML should be easy, I feel."}}