{"action":"created","comment":{"url":"https://api.github.com/repos/pchico83/i2kit/pulls/comments/179842815","pull_request_review_id":110167619,"id":179842815,"diff_hunk":"@@ -0,0 +1,38 @@\n+package k8\n+\n+import (\n+\tlogger \"log\"\n+\t\"os\"\n+\n+\tk8Deployment \"github.com/pchico83/i2kit/cli/providers/k8/deployment\"\n+\tk8service \"github.com/pchico83/i2kit/cli/providers/k8/service\"\n+\t\"github.com/pchico83/i2kit/cli/schemas/environment\"\n+\t\"github.com/pchico83/i2kit/cli/schemas/service\"\n+)\n+\n+//Destroy destroys a k8 deployment\n+func Destroy(s *service.Service, e *environment.Environment, log *logger.Logger) error {\n+\tdeploymentName := s.GetFullName(e, \"-\")\n+\tlog.Printf(\"Destroying the k8 deployment '%s'...\", deploymentName)\n+\n+\tc, tmpfile, err := e.Provider.GetConfigFile()\n+\tif tmpfile != \"\" {\n+\t\tdefer os.Remove(tmpfile)\n+\t}\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\n+\terr = k8Deployment.Destroy(s, e, c, log)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\tif len(s.GetPorts()) > 0 {\n+\t\terr = k8service.Destroy(s, e, c, log)\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t}\n+\tlog.Printf(\"Done!\")","path":"cli/providers/k8/destroy.go","position":null,"original_position":36,"commit_id":"ba9056c906f7277ccf80ade576299bf148004882","original_commit_id":"499bb7cc7cc551706d6bb5c45399f22c870f7c25","user":{"login":"pchico83","id":7474696,"avatar_url":"https://avatars3.githubusercontent.com/u/7474696?v=4","gravatar_id":"","url":"https://api.github.com/users/pchico83","html_url":"https://github.com/pchico83","followers_url":"https://api.github.com/users/pchico83/followers","following_url":"https://api.github.com/users/pchico83/following{/other_user}","gists_url":"https://api.github.com/users/pchico83/gists{/gist_id}","starred_url":"https://api.github.com/users/pchico83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchico83/subscriptions","organizations_url":"https://api.github.com/users/pchico83/orgs","repos_url":"https://api.github.com/users/pchico83/repos","events_url":"https://api.github.com/users/pchico83/events{/privacy}","received_events_url":"https://api.github.com/users/pchico83/received_events","type":"User","site_admin":false},"body":"It is to indicate the end of the operation. `docker-compose`for example adds a *Done!* message after every operation.","created_at":"2018-04-06T18:38:04Z","updated_at":"2018-04-06T18:38:04Z","html_url":"https://github.com/pchico83/i2kit/pull/62#discussion_r179842815","pull_request_url":"https://api.github.com/repos/pchico83/i2kit/pulls/62","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/pchico83/i2kit/pulls/comments/179842815"},"html":{"href":"https://github.com/pchico83/i2kit/pull/62#discussion_r179842815"},"pull_request":{"href":"https://api.github.com/repos/pchico83/i2kit/pulls/62"}},"in_reply_to_id":179824349},"pull_request":{"url":"https://api.github.com/repos/pchico83/i2kit/pulls/62","id":179690503,"html_url":"https://github.com/pchico83/i2kit/pull/62","diff_url":"https://github.com/pchico83/i2kit/pull/62.diff","patch_url":"https://github.com/pchico83/i2kit/pull/62.patch","issue_url":"https://api.github.com/repos/pchico83/i2kit/issues/62","number":62,"state":"open","locked":false,"title":" Support for Kubernetes environments","user":{"login":"pchico83","id":7474696,"avatar_url":"https://avatars3.githubusercontent.com/u/7474696?v=4","gravatar_id":"","url":"https://api.github.com/users/pchico83","html_url":"https://github.com/pchico83","followers_url":"https://api.github.com/users/pchico83/followers","following_url":"https://api.github.com/users/pchico83/following{/other_user}","gists_url":"https://api.github.com/users/pchico83/gists{/gist_id}","starred_url":"https://api.github.com/users/pchico83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchico83/subscriptions","organizations_url":"https://api.github.com/users/pchico83/orgs","repos_url":"https://api.github.com/users/pchico83/repos","events_url":"https://api.github.com/users/pchico83/events{/privacy}","received_events_url":"https://api.github.com/users/pchico83/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-05T14:16:55Z","updated_at":"2018-04-06T18:38:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eeeea2c13599c84f166365ec72a5b1bc3751291d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pchico83/i2kit/pulls/62/commits","review_comments_url":"https://api.github.com/repos/pchico83/i2kit/pulls/62/comments","review_comment_url":"https://api.github.com/repos/pchico83/i2kit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pchico83/i2kit/issues/62/comments","statuses_url":"https://api.github.com/repos/pchico83/i2kit/statuses/ba9056c906f7277ccf80ade576299bf148004882","head":{"label":"pchico83:k8","ref":"k8","sha":"ba9056c906f7277ccf80ade576299bf148004882","user":{"login":"pchico83","id":7474696,"avatar_url":"https://avatars3.githubusercontent.com/u/7474696?v=4","gravatar_id":"","url":"https://api.github.com/users/pchico83","html_url":"https://github.com/pchico83","followers_url":"https://api.github.com/users/pchico83/followers","following_url":"https://api.github.com/users/pchico83/following{/other_user}","gists_url":"https://api.github.com/users/pchico83/gists{/gist_id}","starred_url":"https://api.github.com/users/pchico83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchico83/subscriptions","organizations_url":"https://api.github.com/users/pchico83/orgs","repos_url":"https://api.github.com/users/pchico83/repos","events_url":"https://api.github.com/users/pchico83/events{/privacy}","received_events_url":"https://api.github.com/users/pchico83/received_events","type":"User","site_admin":false},"repo":{"id":103525207,"name":"i2kit","full_name":"pchico83/i2kit","owner":{"login":"pchico83","id":7474696,"avatar_url":"https://avatars3.githubusercontent.com/u/7474696?v=4","gravatar_id":"","url":"https://api.github.com/users/pchico83","html_url":"https://github.com/pchico83","followers_url":"https://api.github.com/users/pchico83/followers","following_url":"https://api.github.com/users/pchico83/following{/other_user}","gists_url":"https://api.github.com/users/pchico83/gists{/gist_id}","starred_url":"https://api.github.com/users/pchico83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchico83/subscriptions","organizations_url":"https://api.github.com/users/pchico83/orgs","repos_url":"https://api.github.com/users/pchico83/repos","events_url":"https://api.github.com/users/pchico83/events{/privacy}","received_events_url":"https://api.github.com/users/pchico83/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pchico83/i2kit","description":null,"fork":false,"url":"https://api.github.com/repos/pchico83/i2kit","forks_url":"https://api.github.com/repos/pchico83/i2kit/forks","keys_url":"https://api.github.com/repos/pchico83/i2kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pchico83/i2kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pchico83/i2kit/teams","hooks_url":"https://api.github.com/repos/pchico83/i2kit/hooks","issue_events_url":"https://api.github.com/repos/pchico83/i2kit/issues/events{/number}","events_url":"https://api.github.com/repos/pchico83/i2kit/events","assignees_url":"https://api.github.com/repos/pchico83/i2kit/assignees{/user}","branches_url":"https://api.github.com/repos/pchico83/i2kit/branches{/branch}","tags_url":"https://api.github.com/repos/pchico83/i2kit/tags","blobs_url":"https://api.github.com/repos/pchico83/i2kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pchico83/i2kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pchico83/i2kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/pchico83/i2kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pchico83/i2kit/statuses/{sha}","languages_url":"https://api.github.com/repos/pchico83/i2kit/languages","stargazers_url":"https://api.github.com/repos/pchico83/i2kit/stargazers","contributors_url":"https://api.github.com/repos/pchico83/i2kit/contributors","subscribers_url":"https://api.github.com/repos/pchico83/i2kit/subscribers","subscription_url":"https://api.github.com/repos/pchico83/i2kit/subscription","commits_url":"https://api.github.com/repos/pchico83/i2kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/pchico83/i2kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/pchico83/i2kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/pchico83/i2kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/pchico83/i2kit/contents/{+path}","compare_url":"https://api.github.com/repos/pchico83/i2kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pchico83/i2kit/merges","archive_url":"https://api.github.com/repos/pchico83/i2kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pchico83/i2kit/downloads","issues_url":"https://api.github.com/repos/pchico83/i2kit/issues{/number}","pulls_url":"https://api.github.com/repos/pchico83/i2kit/pulls{/number}","milestones_url":"https://api.github.com/repos/pchico83/i2kit/milestones{/number}","notifications_url":"https://api.github.com/repos/pchico83/i2kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pchico83/i2kit/labels{/name}","releases_url":"https://api.github.com/repos/pchico83/i2kit/releases{/id}","deployments_url":"https://api.github.com/repos/pchico83/i2kit/deployments","created_at":"2017-09-14T11:40:00Z","updated_at":"2018-04-06T09:21:44Z","pushed_at":"2018-04-06T17:57:47Z","git_url":"git://github.com/pchico83/i2kit.git","ssh_url":"git@github.com:pchico83/i2kit.git","clone_url":"https://github.com/pchico83/i2kit.git","svn_url":"https://github.com/pchico83/i2kit","homepage":null,"size":22881,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4,"open_issues":1,"watchers":7,"default_branch":"master"}},"base":{"label":"pchico83:master","ref":"master","sha":"ec97d6f935083bfaf986f7ca0140ee4ffe2808fc","user":{"login":"pchico83","id":7474696,"avatar_url":"https://avatars3.githubusercontent.com/u/7474696?v=4","gravatar_id":"","url":"https://api.github.com/users/pchico83","html_url":"https://github.com/pchico83","followers_url":"https://api.github.com/users/pchico83/followers","following_url":"https://api.github.com/users/pchico83/following{/other_user}","gists_url":"https://api.github.com/users/pchico83/gists{/gist_id}","starred_url":"https://api.github.com/users/pchico83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchico83/subscriptions","organizations_url":"https://api.github.com/users/pchico83/orgs","repos_url":"https://api.github.com/users/pchico83/repos","events_url":"https://api.github.com/users/pchico83/events{/privacy}","received_events_url":"https://api.github.com/users/pchico83/received_events","type":"User","site_admin":false},"repo":{"id":103525207,"name":"i2kit","full_name":"pchico83/i2kit","owner":{"login":"pchico83","id":7474696,"avatar_url":"https://avatars3.githubusercontent.com/u/7474696?v=4","gravatar_id":"","url":"https://api.github.com/users/pchico83","html_url":"https://github.com/pchico83","followers_url":"https://api.github.com/users/pchico83/followers","following_url":"https://api.github.com/users/pchico83/following{/other_user}","gists_url":"https://api.github.com/users/pchico83/gists{/gist_id}","starred_url":"https://api.github.com/users/pchico83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pchico83/subscriptions","organizations_url":"https://api.github.com/users/pchico83/orgs","repos_url":"https://api.github.com/users/pchico83/repos","events_url":"https://api.github.com/users/pchico83/events{/privacy}","received_events_url":"https://api.github.com/users/pchico83/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pchico83/i2kit","description":null,"fork":false,"url":"https://api.github.com/repos/pchico83/i2kit","forks_url":"https://api.github.com/repos/pchico83/i2kit/forks","keys_url":"https://api.github.com/repos/pchico83/i2kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pchico83/i2kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pchico83/i2kit/teams","hooks_url":"https://api.github.com/repos/pchico83/i2kit/hooks","issue_events_url":"https://api.github.com/repos/pchico83/i2kit/issues/events{/number}","events_url":"https://api.github.com/repos/pchico83/i2kit/events","assignees_url":"https://api.github.com/repos/pchico83/i2kit/assignees{/user}","branches_url":"https://api.github.com/repos/pchico83/i2kit/branches{/branch}","tags_url":"https://api.github.com/repos/pchico83/i2kit/tags","blobs_url":"https://api.github.com/repos/pchico83/i2kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pchico83/i2kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pchico83/i2kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/pchico83/i2kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pchico83/i2kit/statuses/{sha}","languages_url":"https://api.github.com/repos/pchico83/i2kit/languages","stargazers_url":"https://api.github.com/repos/pchico83/i2kit/stargazers","contributors_url":"https://api.github.com/repos/pchico83/i2kit/contributors","subscribers_url":"https://api.github.com/repos/pchico83/i2kit/subscribers","subscription_url":"https://api.github.com/repos/pchico83/i2kit/subscription","commits_url":"https://api.github.com/repos/pchico83/i2kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/pchico83/i2kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/pchico83/i2kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/pchico83/i2kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/pchico83/i2kit/contents/{+path}","compare_url":"https://api.github.com/repos/pchico83/i2kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pchico83/i2kit/merges","archive_url":"https://api.github.com/repos/pchico83/i2kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pchico83/i2kit/downloads","issues_url":"https://api.github.com/repos/pchico83/i2kit/issues{/number}","pulls_url":"https://api.github.com/repos/pchico83/i2kit/pulls{/number}","milestones_url":"https://api.github.com/repos/pchico83/i2kit/milestones{/number}","notifications_url":"https://api.github.com/repos/pchico83/i2kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pchico83/i2kit/labels{/name}","releases_url":"https://api.github.com/repos/pchico83/i2kit/releases{/id}","deployments_url":"https://api.github.com/repos/pchico83/i2kit/deployments","created_at":"2017-09-14T11:40:00Z","updated_at":"2018-04-06T09:21:44Z","pushed_at":"2018-04-06T17:57:47Z","git_url":"git://github.com/pchico83/i2kit.git","ssh_url":"git@github.com:pchico83/i2kit.git","clone_url":"https://github.com/pchico83/i2kit.git","svn_url":"https://github.com/pchico83/i2kit","homepage":null,"size":22881,"stargazers_count":7,"watchers_count":7,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":4,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pchico83/i2kit/pulls/62"},"html":{"href":"https://github.com/pchico83/i2kit/pull/62"},"issue":{"href":"https://api.github.com/repos/pchico83/i2kit/issues/62"},"comments":{"href":"https://api.github.com/repos/pchico83/i2kit/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/pchico83/i2kit/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/pchico83/i2kit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pchico83/i2kit/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/pchico83/i2kit/statuses/ba9056c906f7277ccf80ade576299bf148004882"}},"author_association":"OWNER"}}
{"actor":{"display_login":"pchico83"}}