{"action":"created","issue":{"url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/47","labels_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/47/comments","events_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/47/events","html_url":"https://github.com/ember-cli/ember-cli-deploy/issues/47","id":59266645,"number":47,"title":"Deployment pipeline for 0.5.0","user":{"login":"ryanto","id":89411,"avatar_url":"https://avatars.githubusercontent.com/u/89411?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanto","html_url":"https://github.com/ryanto","followers_url":"https://api.github.com/users/ryanto/followers","following_url":"https://api.github.com/users/ryanto/following{/other_user}","gists_url":"https://api.github.com/users/ryanto/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanto/subscriptions","organizations_url":"https://api.github.com/users/ryanto/orgs","repos_url":"https://api.github.com/users/ryanto/repos","events_url":"https://api.github.com/users/ryanto/events{/privacy}","received_events_url":"https://api.github.com/users/ryanto/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/labels/discussion","name":"discussion","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/milestones/1","html_url":"https://github.com/ember-cli/ember-cli-deploy/milestones/0.5.0","labels_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/milestones/1/labels","id":999981,"number":1,"title":"0.5.0","description":"First release with new pipeline/plugins/hooks approach","creator":{"login":"lukemelia","id":353,"avatar_url":"https://avatars.githubusercontent.com/u/353?v=3","gravatar_id":"","url":"https://api.github.com/users/lukemelia","html_url":"https://github.com/lukemelia","followers_url":"https://api.github.com/users/lukemelia/followers","following_url":"https://api.github.com/users/lukemelia/following{/other_user}","gists_url":"https://api.github.com/users/lukemelia/gists{/gist_id}","starred_url":"https://api.github.com/users/lukemelia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukemelia/subscriptions","organizations_url":"https://api.github.com/users/lukemelia/orgs","repos_url":"https://api.github.com/users/lukemelia/repos","events_url":"https://api.github.com/users/lukemelia/events{/privacy}","received_events_url":"https://api.github.com/users/lukemelia/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":7,"state":"open","created_at":"2015-02-28T14:07:45Z","updated_at":"2015-03-11T03:15:10Z","due_on":"2015-03-30T04:00:00Z","closed_at":null},"comments":23,"created_at":"2015-02-27T17:25:24Z","updated_at":"2015-03-16T22:52:02Z","closed_at":null,"body":"# Deployment pipeline\r\n\r\nWe can look at deploys are a series of steps that change the state of our production application. Our plan is to provide hooks that represent the common steps that you would find in the deployment lifecycle of an Ember application. Deploy adapters will be able to hook onto one or more of the pipeline steps to add functionality to the deploy.\r\n\r\n### Proposed steps\r\n\r\n1. willDeploy\r\n1. build\r\n1. update\r\n1. activate\r\n1. didDeploy\r\n\r\nQuestions / comments:\r\n* Is it worth providing an API for adding a step?\r\n\r\n### Hooks\r\n\r\nAdapters will register themselves with one or more of the hooks to provide functionality. Registration is done by having a function named `deployHookName` on the adapter object.\r\n\r\n```javascript\r\nS3Adapter = {\r\n  deployAssets: function(deploy) {\r\n    var results = this.uploadAssets();\r\n    ...\r\n  }\r\n}\r\n```\r\n*Edited to match luke's comment below.*\r\n\r\nQuestions / comments\r\n\r\n* Does order matter? If I register two adapters to ``build`` hook is there a situation where I need to control which gets run first?\r\n\r\n### Default adapters\r\n\r\nBy default ember-cli-deploy will ship with a `BuildDistAdapter` that hooks into the `build` step. This runs `ember build`. It's a good example of a simple adapter + hook, 99% of people will use it, and it easy to override if you need different build-to-dist functionality.\r\n\r\nQuestions / comments:\r\n\r\n* Does this mean we need to provide an API for removing adapters from hooks?\r\n\r\n### Shared state and deploy metadata\r\n\r\nAdapters may want to share data with other adapters that may run later in the lifecycle. For example a post-deploy adapter may want to summarize all the work done by your build, asset, and index adapters.\r\n\r\nThere will be an API to read the return values from other adapters. Consider it unstable and not encouraged, but it will be there to see if this is something useful to provide. If we notice of pattern of adapters sharing information we can hopefully provide a shiny API.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/comments/81975588","html_url":"https://github.com/ember-cli/ember-cli-deploy/issues/47#issuecomment-81975588","issue_url":"https://api.github.com/repos/ember-cli/ember-cli-deploy/issues/47","id":81975588,"user":{"login":"Twinkletoes","id":2016523,"avatar_url":"https://avatars.githubusercontent.com/u/2016523?v=3","gravatar_id":"","url":"https://api.github.com/users/Twinkletoes","html_url":"https://github.com/Twinkletoes","followers_url":"https://api.github.com/users/Twinkletoes/followers","following_url":"https://api.github.com/users/Twinkletoes/following{/other_user}","gists_url":"https://api.github.com/users/Twinkletoes/gists{/gist_id}","starred_url":"https://api.github.com/users/Twinkletoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Twinkletoes/subscriptions","organizations_url":"https://api.github.com/users/Twinkletoes/orgs","repos_url":"https://api.github.com/users/Twinkletoes/repos","events_url":"https://api.github.com/users/Twinkletoes/events{/privacy}","received_events_url":"https://api.github.com/users/Twinkletoes/received_events","type":"User","site_admin":false},"created_at":"2015-03-16T22:52:02Z","updated_at":"2015-03-16T22:52:02Z","body":"I'd like to see each service have a plugin, and the ordering be explicit - this allows the ability to have configurable steps.\r\n\r\ne.g. I cannot set up a Route53 DNS alias to my Cloudfront distribution until that distribution is created. But these steps should be done by different configurable plugins.\r\n\r\nIf I have a B2B and B2C setup which only differ by branding then I may have to configure multiple Cloudfront distributions - if everything is automated to auto register plugins, how would I configure the deploy to run two configuration steps with different configs?\r\n\r\nIt feels to me as though there needs to be a script or a declarative file which sets the order of deployment steps. This would allow multiple copies of a single task, or conditional execution of steps, or pushing the output of one task into the input of another."}}