{"action":"created","issue":{"url":"https://api.github.com/repos/gocd/gocd/issues/5175","repository_url":"https://api.github.com/repos/gocd/gocd","labels_url":"https://api.github.com/repos/gocd/gocd/issues/5175/labels{/name}","comments_url":"https://api.github.com/repos/gocd/gocd/issues/5175/comments","events_url":"https://api.github.com/repos/gocd/gocd/issues/5175/events","html_url":"https://github.com/gocd/gocd/issues/5175","id":360963403,"node_id":"MDU6SXNzdWUzNjA5NjM0MDM=","number":5175,"title":"Thoughts about improving pipelines as code (config-repo)","user":{"login":"arvindsv","id":172235,"node_id":"MDQ6VXNlcjE3MjIzNQ==","avatar_url":"https://avatars2.githubusercontent.com/u/172235?v=4","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},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/gocd/gocd/milestones/48","html_url":"https://github.com/gocd/gocd/milestone/48","labels_url":"https://api.github.com/repos/gocd/gocd/milestones/48/labels","id":3644256,"node_id":"MDk6TWlsZXN0b25lMzY0NDI1Ng==","number":48,"title":"Release 18.11","description":"","creator":{"login":"ketan","id":10598,"node_id":"MDQ6VXNlcjEwNTk4","avatar_url":"https://avatars3.githubusercontent.com/u/10598?v=4","gravatar_id":"","url":"https://api.github.com/users/ketan","html_url":"https://github.com/ketan","followers_url":"https://api.github.com/users/ketan/followers","following_url":"https://api.github.com/users/ketan/following{/other_user}","gists_url":"https://api.github.com/users/ketan/gists{/gist_id}","starred_url":"https://api.github.com/users/ketan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ketan/subscriptions","organizations_url":"https://api.github.com/users/ketan/orgs","repos_url":"https://api.github.com/users/ketan/repos","events_url":"https://api.github.com/users/ketan/events{/privacy}","received_events_url":"https://api.github.com/users/ketan/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2018-09-11T14:14:58Z","updated_at":"2018-09-20T16:10:41Z","due_on":"2018-11-25T08:00:00Z","closed_at":null},"comments":9,"created_at":"2018-09-17T17:15:27Z","updated_at":"2018-09-20T22:30:41Z","closed_at":null,"author_association":"MEMBER","body":"This is a \"hub-issue\" for thoughts about upcoming improvements to GoCD's pipelines as code feature. Based on a conversation with @kierarad @ibnc @marques-work and @ankitsri11.\r\n\r\n## Current state:\r\n\r\n### Documentation and getting started experience:\r\n- [Docs are not clear](https://docs.gocd.org/current/advanced_usage/pipelines_as_code.html) about the fact that plugins are bundled.\r\n- Docs suggest editing the XML. There are APIs to add a config repo.\r\n- Confusion between terms: Config repo (which is also something else in GoCD) and \"Pipelines as Code\".\r\n- Plugins page doesn’t say that the plugins are bundled.\r\n\r\n### User experience:\r\n- Feedback loop: Cryptic error messages\r\n- Feedback loop: Error messages are hidden in the “Errors and Warnings” modal. Not obvious.\r\n- Feedback loop: Unclear whether GoCD has seen the commit.\r\n- Feedback loop: Cannot force GoCD to do a check.\r\n- Feedback loop: Cannot see which repo a pipeline came from.\r\n- Information about \"How to add it, how to manage it, etc\" is not in GoCD\r\n- Can't see YAML / JSON pipelines in GoCD.\r\n- JSON: Was very verbose. It should be: \"I want to set this one property and it should work. Instead, had to set a bunch of things to empty array\"\r\n\r\n## Ideas (for changes to the current state):\r\n\r\nThere are just ideas. No guarantee that all of these will be done:\r\n\r\n- Idea 1: Put in an interface in front of it (SPA) [**Starting with this idea: See #5177**]\r\n    - Should show all configured config repos\r\n    - Who can see this? See “Better authorization” below.\r\n    - Should show the last commit seen and whether there are errors currently (and if so, those errors).\r\n    - Should allow forcing a check on the repo\r\n    - All of this will be through a set of new API endpoints\r\n- Idea 2: Show it under \"Create pipelines\" as an option.\r\n- Idea 3: Convert existing pipelines to YAML / JSON (\"Export as\").\r\n- Idea 4: Helper tool which …\r\n    - … assists in building yaml / json templates.\r\n    - … does syntax checking\r\n- Idea 5: External API which checks the code, preflight, before commit.\r\n- Idea 6: Improve those error messages\r\n- Idea 7: Once this is in a good state, change the [\"Getting Started\" docs](https://www.gocd.org/getting-started/part-1/) to use this.\r\n\r\n### Beyond the user experience:\r\n\r\n- Encrypted variables: Secrets management. Ties into better secrets management in GoCD.\r\n    - Secrets defined at a higher level (GoCD’s top-level) and ties into the “Better authorization” below.\r\n    - At config repo level, admin should be able to decide which set of keys are usable by this repo.\r\n- All entities from repo?\r\n    - Why should it be restricted to only pipelines?\r\n    - Why not global SCM materials? Like GitHub PR materials.\r\n    - Why not templates? [There's a completely different idea about templates [here](https://github.com/tomzo/gocd-yaml-config-plugin/issues/2)]\r\n- Better authorization\r\n    - Currently, giving access to a config repo’s backing SCM repo means giving full access to the GoCD instance, almost. Anyone with access can add to any environment or pipeline group.\r\n    - Should at least be able to restrict (defined pipelines in a repo) to a given set of environments or pipeline groups.\r\n    - Should we use a named list of users/roles at the config-repo level to decide who gets to see the interface?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/gocd/gocd/issues/comments/423355225","html_url":"https://github.com/gocd/gocd/issues/5175#issuecomment-423355225","issue_url":"https://api.github.com/repos/gocd/gocd/issues/5175","id":423355225,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzM1NTIyNQ==","user":{"login":"stCarolas","id":2007081,"node_id":"MDQ6VXNlcjIwMDcwODE=","avatar_url":"https://avatars2.githubusercontent.com/u/2007081?v=4","gravatar_id":"","url":"https://api.github.com/users/stCarolas","html_url":"https://github.com/stCarolas","followers_url":"https://api.github.com/users/stCarolas/followers","following_url":"https://api.github.com/users/stCarolas/following{/other_user}","gists_url":"https://api.github.com/users/stCarolas/gists{/gist_id}","starred_url":"https://api.github.com/users/stCarolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stCarolas/subscriptions","organizations_url":"https://api.github.com/users/stCarolas/orgs","repos_url":"https://api.github.com/users/stCarolas/repos","events_url":"https://api.github.com/users/stCarolas/events{/privacy}","received_events_url":"https://api.github.com/users/stCarolas/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T22:30:41Z","updated_at":"2018-09-20T22:30:41Z","author_association":"NONE","body":"What about https://github.com/gocd/gocd/issues/3985 ?\r\nThere is a practice of putting pipeline code in source repo like travis but it seems like big load on git server  \r\nWe have 150+ such repos"}}
{"actor":{"display_login":"stCarolas"}}