{"action":"created","comment":{"url":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/comments/82561178","pull_request_review_id":3459634,"id":82561178,"diff_hunk":"@@ -60,17 +66,38 @@ def start(self, backend='local', swf_domain='slingshot', swf_version='1', auth_c\n \n     async def deploy(self, config, events=None, follow=False):\n         \"\"\" Trigger deployment from Slingshot Config.\n+\n+        A deployment is divided in two phases, generating the plan and running the workflow.\n+        \n+        Generating the plan consists in running the docker container for the plugins provided in the config.\n+        Each plugin is responsible to return the plan (or series of step to do/rollback) for part of the workflow.\n+\n+        Running the workflow consists on running every step on the plan.\n+\n+        Every containers, regardless if it's a plugin or step container, get passed a global list of environment\n+        variable that can be when starting the engine.\n         \"\"\"\n         workflow = Workflow(events=events)\n         for data in config['pipeline']:\n-            status, output = await Step(**data, description='').run(\n+            # extend the plutin environment variables\n+            data['environment'] = dict(data.get('environment', {}), **self.config.environment_variables)","path":"slingshot/engine.py","position":57,"original_position":57,"commit_id":"8cc704078950832716835538b3a4f36d285c6e5d","original_commit_id":"8cc704078950832716835538b3a4f36d285c6e5d","user":{"login":"balintzs","id":16084033,"avatar_url":"https://avatars.githubusercontent.com/u/16084033?v=3","gravatar_id":"","url":"https://api.github.com/users/balintzs","html_url":"https://github.com/balintzs","followers_url":"https://api.github.com/users/balintzs/followers","following_url":"https://api.github.com/users/balintzs/following{/other_user}","gists_url":"https://api.github.com/users/balintzs/gists{/gist_id}","starred_url":"https://api.github.com/users/balintzs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balintzs/subscriptions","organizations_url":"https://api.github.com/users/balintzs/orgs","repos_url":"https://api.github.com/users/balintzs/repos","events_url":"https://api.github.com/users/balintzs/events{/privacy}","received_events_url":"https://api.github.com/users/balintzs/received_events","type":"User","site_admin":false},"body":"To clarify: the values from `data` should be the ultimate truth. Also, when you do this, if both `data` and `self.config` define the same keyword, you'll get \"TypeError: type object got multiple values for keyword argument 'foo'\"","created_at":"2016-10-10T08:27:12Z","updated_at":"2016-10-10T08:27:12Z","html_url":"https://github.com/Skyscanner/slingshot-engine/pull/18#discussion_r82561178","pull_request_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/comments/82561178"},"html":{"href":"https://github.com/Skyscanner/slingshot-engine/pull/18#discussion_r82561178"},"pull_request":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/18","id":88574967,"html_url":"https://github.com/Skyscanner/slingshot-engine/pull/18","diff_url":"https://github.com/Skyscanner/slingshot-engine/pull/18.diff","patch_url":"https://github.com/Skyscanner/slingshot-engine/pull/18.patch","issue_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues/18","number":18,"state":"open","locked":false,"title":"feat: server config and engine environment variables","user":{"login":"skygeo","id":12135180,"avatar_url":"https://avatars.githubusercontent.com/u/12135180?v=3","gravatar_id":"","url":"https://api.github.com/users/skygeo","html_url":"https://github.com/skygeo","followers_url":"https://api.github.com/users/skygeo/followers","following_url":"https://api.github.com/users/skygeo/following{/other_user}","gists_url":"https://api.github.com/users/skygeo/gists{/gist_id}","starred_url":"https://api.github.com/users/skygeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skygeo/subscriptions","organizations_url":"https://api.github.com/users/skygeo/orgs","repos_url":"https://api.github.com/users/skygeo/repos","events_url":"https://api.github.com/users/skygeo/events{/privacy}","received_events_url":"https://api.github.com/users/skygeo/received_events","type":"User","site_admin":false},"body":"this includes:\r\n- move all the engine configuration (ie runner, swf_domain ...) into a ini file that can be provided at started.\r\n   ```slingshot server [-c slingshot-engine.ini] \r\n- add a slingshot/confspec.ini in order to validate and set default values for the config\r\n- add a new engine 'environment-variables' config section in order to provide environment variables that will be passed to every steps and plugin containers.\r\n- add minimal readme documentation.","created_at":"2016-10-09T09:26:32Z","updated_at":"2016-10-10T08:27:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7361a3ae57515c0606d73d921bc5e9058c98b9a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/18/commits","review_comments_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/18/comments","review_comment_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues/18/comments","statuses_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/statuses/8cc704078950832716835538b3a4f36d285c6e5d","head":{"label":"Skyscanner:engineconf","ref":"engineconf","sha":"8cc704078950832716835538b3a4f36d285c6e5d","user":{"login":"Skyscanner","id":522811,"avatar_url":"https://avatars.githubusercontent.com/u/522811?v=3","gravatar_id":"","url":"https://api.github.com/users/Skyscanner","html_url":"https://github.com/Skyscanner","followers_url":"https://api.github.com/users/Skyscanner/followers","following_url":"https://api.github.com/users/Skyscanner/following{/other_user}","gists_url":"https://api.github.com/users/Skyscanner/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyscanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyscanner/subscriptions","organizations_url":"https://api.github.com/users/Skyscanner/orgs","repos_url":"https://api.github.com/users/Skyscanner/repos","events_url":"https://api.github.com/users/Skyscanner/events{/privacy}","received_events_url":"https://api.github.com/users/Skyscanner/received_events","type":"Organization","site_admin":false},"repo":{"id":65018796,"name":"slingshot-engine","full_name":"Skyscanner/slingshot-engine","owner":{"login":"Skyscanner","id":522811,"avatar_url":"https://avatars.githubusercontent.com/u/522811?v=3","gravatar_id":"","url":"https://api.github.com/users/Skyscanner","html_url":"https://github.com/Skyscanner","followers_url":"https://api.github.com/users/Skyscanner/followers","following_url":"https://api.github.com/users/Skyscanner/following{/other_user}","gists_url":"https://api.github.com/users/Skyscanner/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyscanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyscanner/subscriptions","organizations_url":"https://api.github.com/users/Skyscanner/orgs","repos_url":"https://api.github.com/users/Skyscanner/repos","events_url":"https://api.github.com/users/Skyscanner/events{/privacy}","received_events_url":"https://api.github.com/users/Skyscanner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Skyscanner/slingshot-engine","description":null,"fork":false,"url":"https://api.github.com/repos/Skyscanner/slingshot-engine","forks_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/forks","keys_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/teams","hooks_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/hooks","issue_events_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues/events{/number}","events_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/events","assignees_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/assignees{/user}","branches_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/branches{/branch}","tags_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/tags","blobs_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/languages","stargazers_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/stargazers","contributors_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/contributors","subscribers_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/subscribers","subscription_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/subscription","commits_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/contents/{+path}","compare_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/merges","archive_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/downloads","issues_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues{/number}","pulls_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/labels{/name}","releases_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/releases{/id}","deployments_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/deployments","created_at":"2016-08-05T13:01:31Z","updated_at":"2016-10-06T11:31:18Z","pushed_at":"2016-10-10T08:05:45Z","git_url":"git://github.com/Skyscanner/slingshot-engine.git","ssh_url":"git@github.com:Skyscanner/slingshot-engine.git","clone_url":"https://github.com/Skyscanner/slingshot-engine.git","svn_url":"https://github.com/Skyscanner/slingshot-engine","homepage":null,"size":181,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"Skyscanner:master","ref":"master","sha":"ee02ed4f045b2dace68e6773bbe40edd0394d9c3","user":{"login":"Skyscanner","id":522811,"avatar_url":"https://avatars.githubusercontent.com/u/522811?v=3","gravatar_id":"","url":"https://api.github.com/users/Skyscanner","html_url":"https://github.com/Skyscanner","followers_url":"https://api.github.com/users/Skyscanner/followers","following_url":"https://api.github.com/users/Skyscanner/following{/other_user}","gists_url":"https://api.github.com/users/Skyscanner/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyscanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyscanner/subscriptions","organizations_url":"https://api.github.com/users/Skyscanner/orgs","repos_url":"https://api.github.com/users/Skyscanner/repos","events_url":"https://api.github.com/users/Skyscanner/events{/privacy}","received_events_url":"https://api.github.com/users/Skyscanner/received_events","type":"Organization","site_admin":false},"repo":{"id":65018796,"name":"slingshot-engine","full_name":"Skyscanner/slingshot-engine","owner":{"login":"Skyscanner","id":522811,"avatar_url":"https://avatars.githubusercontent.com/u/522811?v=3","gravatar_id":"","url":"https://api.github.com/users/Skyscanner","html_url":"https://github.com/Skyscanner","followers_url":"https://api.github.com/users/Skyscanner/followers","following_url":"https://api.github.com/users/Skyscanner/following{/other_user}","gists_url":"https://api.github.com/users/Skyscanner/gists{/gist_id}","starred_url":"https://api.github.com/users/Skyscanner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skyscanner/subscriptions","organizations_url":"https://api.github.com/users/Skyscanner/orgs","repos_url":"https://api.github.com/users/Skyscanner/repos","events_url":"https://api.github.com/users/Skyscanner/events{/privacy}","received_events_url":"https://api.github.com/users/Skyscanner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Skyscanner/slingshot-engine","description":null,"fork":false,"url":"https://api.github.com/repos/Skyscanner/slingshot-engine","forks_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/forks","keys_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/teams","hooks_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/hooks","issue_events_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues/events{/number}","events_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/events","assignees_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/assignees{/user}","branches_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/branches{/branch}","tags_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/tags","blobs_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/statuses/{sha}","languages_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/languages","stargazers_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/stargazers","contributors_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/contributors","subscribers_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/subscribers","subscription_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/subscription","commits_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/contents/{+path}","compare_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/merges","archive_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/downloads","issues_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues{/number}","pulls_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls{/number}","milestones_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/milestones{/number}","notifications_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/labels{/name}","releases_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/releases{/id}","deployments_url":"https://api.github.com/repos/Skyscanner/slingshot-engine/deployments","created_at":"2016-08-05T13:01:31Z","updated_at":"2016-10-06T11:31:18Z","pushed_at":"2016-10-10T08:05:45Z","git_url":"git://github.com/Skyscanner/slingshot-engine.git","ssh_url":"git@github.com:Skyscanner/slingshot-engine.git","clone_url":"https://github.com/Skyscanner/slingshot-engine.git","svn_url":"https://github.com/Skyscanner/slingshot-engine","homepage":null,"size":181,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/18"},"html":{"href":"https://github.com/Skyscanner/slingshot-engine/pull/18"},"issue":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues/18"},"comments":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/Skyscanner/slingshot-engine/statuses/8cc704078950832716835538b3a4f36d285c6e5d"}}}}
{"actor":{"display_login":"balintzs"}}