{"action":"created","issue":{"url":"https://api.github.com/repos/gocd/gocd/issues/5374","repository_url":"https://api.github.com/repos/gocd/gocd","labels_url":"https://api.github.com/repos/gocd/gocd/issues/5374/labels{/name}","comments_url":"https://api.github.com/repos/gocd/gocd/issues/5374/comments","events_url":"https://api.github.com/repos/gocd/gocd/issues/5374/events","html_url":"https://github.com/gocd/gocd/issues/5374","id":378902413,"node_id":"MDU6SXNzdWUzNzg5MDI0MTM=","number":5374,"title":"Expose CR contract to plugins","user":{"login":"ibnc","id":5726224,"node_id":"MDQ6VXNlcjU3MjYyMjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/5726224?v=4","gravatar_id":"","url":"https://api.github.com/users/ibnc","html_url":"https://github.com/ibnc","followers_url":"https://api.github.com/users/ibnc/followers","following_url":"https://api.github.com/users/ibnc/following{/other_user}","gists_url":"https://api.github.com/users/ibnc/gists{/gist_id}","starred_url":"https://api.github.com/users/ibnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibnc/subscriptions","organizations_url":"https://api.github.com/users/ibnc/orgs","repos_url":"https://api.github.com/users/ibnc/repos","events_url":"https://api.github.com/users/ibnc/events{/privacy}","received_events_url":"https://api.github.com/users/ibnc/received_events","type":"User","site_admin":false},"labels":[{"id":758339099,"node_id":"MDU6TGFiZWw3NTgzMzkwOTk=","url":"https://api.github.com/repos/gocd/gocd/labels/config%20repo","name":"config repo","color":"b1d361","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-08T20:25:04Z","updated_at":"2018-11-08T20:31:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Epic: #5175 (Thoughts about improving pipelines as code (config-repo))\r\n\r\nProposal/idea for improving pipeline as code. See https://github.com/gocd/gocd/issues/5338#issuecomment-437125598 and https://github.com/gocd/gocd/issues/5338#issuecomment-437133247\r\n\r\n## summary\r\nI'd like to propose that we expose the config repo contract (aka the [CR models](https://github.com/gocd/gocd/tree/master/plugin-infra/go-plugin-access/src/main/java/com/thoughtworks/go/plugin/access/configrepo/contract)) to the the plugins.  \r\n\r\nThere are a few possible benefits to doing this that I can see: \r\n*  It'd make serialization/deserialization easier on the plugin side ([example where it would help](https://github.com/tomzo/gocd-yaml-config-plugin/blob/master/src/main/java/cd/go/plugin/config/yaml/YamlConfigPlugin.java#L82))\r\n*  It'd make it easier to create new repo config plugins. \r\n*  It'd help ensure the data structure is consistent/correct across the plugins.\r\n   * along these same lines make it easier to test/validate  (instead of doing this: [test](https://github.com/tomzo/gocd-yaml-config-plugin/blob/master/src/test/java/cd/go/plugin/config/yaml/transforms/PipelineTransformTest.java) and [test files](https://github.com/tomzo/gocd-yaml-config-plugin/tree/master/src/test/resources/parts) seeing if it can be serialized to the CR model would likely be sufficient to validate)\r\n* it'd help simplify exporting gocd structures on the plugin side\r\n\r\n@ketan @arvindsv @marques-work @kierarad @tomzo "},"comment":{"url":"https://api.github.com/repos/gocd/gocd/issues/comments/437145359","html_url":"https://github.com/gocd/gocd/issues/5374#issuecomment-437145359","issue_url":"https://api.github.com/repos/gocd/gocd/issues/5374","id":437145359,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzE0NTM1OQ==","user":{"login":"tomzo","id":5710970,"node_id":"MDQ6VXNlcjU3MTA5NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/5710970?v=4","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},"created_at":"2018-11-08T20:31:53Z","updated_at":"2018-11-08T20:31:53Z","author_association":"CONTRIBUTOR","body":"I am buying all the benefits for having the classes available as public library.\r\nIMO the best solution is to create a separate module with CR classes, which has its own release cycle, meaning independent from GoCD core.\r\nThen it is a reference for server or plugins or any tool that needs it.\r\n\r\nI wouldn't fall back to using class-based plugin API, if that's what you are proposing."}}
{"actor":{"display_login":"tomzo"}}