{"action":"created","comment":{"url":"https://api.github.com/repos/keboola/docker-bundle/pulls/comments/90036531","pull_request_review_id":10562110,"id":90036531,"diff_hunk":"@@ -274,36 +268,38 @@ public function sandboxComponent($jobId, $componentId, $configData, $mode)\n \n         $componentOutput = '';\n         if ($mode == 'dry-run') {\n-            $componentOutput = $this->runImages($jobId);\n+            $componentOutput = $this->runImages($jobId, $configId, $component);\n         } else {\n             $this->configFile->createConfigFile($configData);\n         }\n \n-        $this->dataLoader->storeDataArchive([$mode, 'docker', $componentId]);\n+        $this->dataLoader->storeDataArchive([$mode, 'docker', $component['id']]);\n         // finalize\n         $this->dataDirectory->dropDataDir();\n         return $componentOutput;\n     }\n \n-    private function runImages($jobId)\n+    private function runImages($jobId, $configId, $component)\n     {\n         $componentOutput = '';\n         $images = $this->imageCreator->prepareImages();\n         $this->loggerService->setVerbosity($images[0]->getLoggerVerbosity());\n \n         $counter = 0;\n         foreach ($images as $priority => $image) {\n+            $this->environment = new Environment(\n+                $this->storageClient,\n+                $configId,\n+                $component,\n+                $image->getConfigData()['parameters']\n+            );\n+\n             $this->configFile->createConfigFile($image->getConfigData());\n             $containerId = $jobId . '-' . $this->storageClient->getRunId();\n-            if ($image->isMain()) {\n-                $environmentParameters = [];\n-            } else {\n-                $environmentParameters = $image->getConfigData()['parameters'];\n-            }\n             $container = $this->createContainerFromImage(\n                 $image,\n                 $containerId,\n-                $this->environment->getEnvironmentVariables($environmentParameters)\n+                $this->environment->getEnvironmentVariables()\n             );\n             $output = $container->run();\n             if ($image->isMain()) {","path":"Service/Runner.php","position":107,"original_position":107,"commit_id":"fa4fc1f72541a09ecc59db29b2836c12d99b92d5","original_commit_id":"fa4fc1f72541a09ecc59db29b2836c12d99b92d5","user":{"login":"ondrejhlavacek","id":497675,"avatar_url":"https://avatars.githubusercontent.com/u/497675?v=3","gravatar_id":"","url":"https://api.github.com/users/ondrejhlavacek","html_url":"https://github.com/ondrejhlavacek","followers_url":"https://api.github.com/users/ondrejhlavacek/followers","following_url":"https://api.github.com/users/ondrejhlavacek/following{/other_user}","gists_url":"https://api.github.com/users/ondrejhlavacek/gists{/gist_id}","starred_url":"https://api.github.com/users/ondrejhlavacek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondrejhlavacek/subscriptions","organizations_url":"https://api.github.com/users/ondrejhlavacek/orgs","repos_url":"https://api.github.com/users/ondrejhlavacek/repos","events_url":"https://api.github.com/users/ondrejhlavacek/events{/privacy}","received_events_url":"https://api.github.com/users/ondrejhlavacek/received_events","type":"User","site_admin":false},"body":"nešlo by tohle nějak nahradit? ","created_at":"2016-11-29T15:47:36Z","updated_at":"2016-11-29T15:47:36Z","html_url":"https://github.com/keboola/docker-bundle/pull/101#discussion_r90036531","pull_request_url":"https://api.github.com/repos/keboola/docker-bundle/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/comments/90036531"},"html":{"href":"https://github.com/keboola/docker-bundle/pull/101#discussion_r90036531"},"pull_request":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/keboola/docker-bundle/pulls/101","id":95710888,"html_url":"https://github.com/keboola/docker-bundle/pull/101","diff_url":"https://github.com/keboola/docker-bundle/pull/101.diff","patch_url":"https://github.com/keboola/docker-bundle/pull/101.patch","issue_url":"https://api.github.com/repos/keboola/docker-bundle/issues/101","number":101,"state":"open","locked":false,"title":"add inject_environment parameter","user":{"login":"odinuv","id":4319320,"avatar_url":"https://avatars.githubusercontent.com/u/4319320?v=3","gravatar_id":"","url":"https://api.github.com/users/odinuv","html_url":"https://github.com/odinuv","followers_url":"https://api.github.com/users/odinuv/followers","following_url":"https://api.github.com/users/odinuv/following{/other_user}","gists_url":"https://api.github.com/users/odinuv/gists{/gist_id}","starred_url":"https://api.github.com/users/odinuv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinuv/subscriptions","organizations_url":"https://api.github.com/users/odinuv/orgs","repos_url":"https://api.github.com/users/odinuv/repos","events_url":"https://api.github.com/users/odinuv/events{/privacy}","received_events_url":"https://api.github.com/users/odinuv/received_events","type":"User","site_admin":false},"body":"feat: add inject_environment parameter to enable injecting configuration to environment (for processors)\r\nrefactor: create environment instance separately for each image\r\nrefactor: replace obsolete image docker-custom-php with docker-custom-php","created_at":"2016-11-29T15:13:01Z","updated_at":"2016-11-29T15:47:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81588f20159c4342495457d88ca9b94c069e0da4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/keboola/docker-bundle/pulls/101/commits","review_comments_url":"https://api.github.com/repos/keboola/docker-bundle/pulls/101/comments","review_comment_url":"https://api.github.com/repos/keboola/docker-bundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keboola/docker-bundle/issues/101/comments","statuses_url":"https://api.github.com/repos/keboola/docker-bundle/statuses/fa4fc1f72541a09ecc59db29b2836c12d99b92d5","head":{"label":"keboola:inject_environment","ref":"inject_environment","sha":"fa4fc1f72541a09ecc59db29b2836c12d99b92d5","user":{"login":"keboola","id":1424387,"avatar_url":"https://avatars.githubusercontent.com/u/1424387?v=3","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"repo":{"id":28211637,"name":"docker-bundle","full_name":"keboola/docker-bundle","owner":{"login":"keboola","id":1424387,"avatar_url":"https://avatars.githubusercontent.com/u/1424387?v=3","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keboola/docker-bundle","description":null,"fork":false,"url":"https://api.github.com/repos/keboola/docker-bundle","forks_url":"https://api.github.com/repos/keboola/docker-bundle/forks","keys_url":"https://api.github.com/repos/keboola/docker-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keboola/docker-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keboola/docker-bundle/teams","hooks_url":"https://api.github.com/repos/keboola/docker-bundle/hooks","issue_events_url":"https://api.github.com/repos/keboola/docker-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/keboola/docker-bundle/events","assignees_url":"https://api.github.com/repos/keboola/docker-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/keboola/docker-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/keboola/docker-bundle/tags","blobs_url":"https://api.github.com/repos/keboola/docker-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keboola/docker-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keboola/docker-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/keboola/docker-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keboola/docker-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/keboola/docker-bundle/languages","stargazers_url":"https://api.github.com/repos/keboola/docker-bundle/stargazers","contributors_url":"https://api.github.com/repos/keboola/docker-bundle/contributors","subscribers_url":"https://api.github.com/repos/keboola/docker-bundle/subscribers","subscription_url":"https://api.github.com/repos/keboola/docker-bundle/subscription","commits_url":"https://api.github.com/repos/keboola/docker-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/keboola/docker-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/keboola/docker-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/keboola/docker-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/keboola/docker-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/keboola/docker-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keboola/docker-bundle/merges","archive_url":"https://api.github.com/repos/keboola/docker-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keboola/docker-bundle/downloads","issues_url":"https://api.github.com/repos/keboola/docker-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/keboola/docker-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/keboola/docker-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/keboola/docker-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keboola/docker-bundle/labels{/name}","releases_url":"https://api.github.com/repos/keboola/docker-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/keboola/docker-bundle/deployments","created_at":"2014-12-19T02:55:47Z","updated_at":"2016-10-25T06:16:25Z","pushed_at":"2016-11-29T15:28:18Z","git_url":"git://github.com/keboola/docker-bundle.git","ssh_url":"git@github.com:keboola/docker-bundle.git","clone_url":"https://github.com/keboola/docker-bundle.git","svn_url":"https://github.com/keboola/docker-bundle","homepage":null,"size":1310,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":24,"forks":1,"open_issues":24,"watchers":3,"default_branch":"master"}},"base":{"label":"keboola:master","ref":"master","sha":"748d2e71bea76d11f60a9447e993ca4441dc8a55","user":{"login":"keboola","id":1424387,"avatar_url":"https://avatars.githubusercontent.com/u/1424387?v=3","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"repo":{"id":28211637,"name":"docker-bundle","full_name":"keboola/docker-bundle","owner":{"login":"keboola","id":1424387,"avatar_url":"https://avatars.githubusercontent.com/u/1424387?v=3","gravatar_id":"","url":"https://api.github.com/users/keboola","html_url":"https://github.com/keboola","followers_url":"https://api.github.com/users/keboola/followers","following_url":"https://api.github.com/users/keboola/following{/other_user}","gists_url":"https://api.github.com/users/keboola/gists{/gist_id}","starred_url":"https://api.github.com/users/keboola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keboola/subscriptions","organizations_url":"https://api.github.com/users/keboola/orgs","repos_url":"https://api.github.com/users/keboola/repos","events_url":"https://api.github.com/users/keboola/events{/privacy}","received_events_url":"https://api.github.com/users/keboola/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keboola/docker-bundle","description":null,"fork":false,"url":"https://api.github.com/repos/keboola/docker-bundle","forks_url":"https://api.github.com/repos/keboola/docker-bundle/forks","keys_url":"https://api.github.com/repos/keboola/docker-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keboola/docker-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keboola/docker-bundle/teams","hooks_url":"https://api.github.com/repos/keboola/docker-bundle/hooks","issue_events_url":"https://api.github.com/repos/keboola/docker-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/keboola/docker-bundle/events","assignees_url":"https://api.github.com/repos/keboola/docker-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/keboola/docker-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/keboola/docker-bundle/tags","blobs_url":"https://api.github.com/repos/keboola/docker-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keboola/docker-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keboola/docker-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/keboola/docker-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keboola/docker-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/keboola/docker-bundle/languages","stargazers_url":"https://api.github.com/repos/keboola/docker-bundle/stargazers","contributors_url":"https://api.github.com/repos/keboola/docker-bundle/contributors","subscribers_url":"https://api.github.com/repos/keboola/docker-bundle/subscribers","subscription_url":"https://api.github.com/repos/keboola/docker-bundle/subscription","commits_url":"https://api.github.com/repos/keboola/docker-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/keboola/docker-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/keboola/docker-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/keboola/docker-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/keboola/docker-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/keboola/docker-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keboola/docker-bundle/merges","archive_url":"https://api.github.com/repos/keboola/docker-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keboola/docker-bundle/downloads","issues_url":"https://api.github.com/repos/keboola/docker-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/keboola/docker-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/keboola/docker-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/keboola/docker-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keboola/docker-bundle/labels{/name}","releases_url":"https://api.github.com/repos/keboola/docker-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/keboola/docker-bundle/deployments","created_at":"2014-12-19T02:55:47Z","updated_at":"2016-10-25T06:16:25Z","pushed_at":"2016-11-29T15:28:18Z","git_url":"git://github.com/keboola/docker-bundle.git","ssh_url":"git@github.com:keboola/docker-bundle.git","clone_url":"https://github.com/keboola/docker-bundle.git","svn_url":"https://github.com/keboola/docker-bundle","homepage":null,"size":1310,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":24,"forks":1,"open_issues":24,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/101"},"html":{"href":"https://github.com/keboola/docker-bundle/pull/101"},"issue":{"href":"https://api.github.com/repos/keboola/docker-bundle/issues/101"},"comments":{"href":"https://api.github.com/repos/keboola/docker-bundle/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keboola/docker-bundle/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/keboola/docker-bundle/statuses/fa4fc1f72541a09ecc59db29b2836c12d99b92d5"}}}}
{"actor":{"display_login":"ondrejhlavacek"}}