{"action":"created","comment":{"url":"https://api.github.com/repos/Camversity/cli/pulls/comments/171166913","pull_request_review_id":99971026,"id":171166913,"diff_hunk":"@@ -299,14 +306,73 @@ function rollout_status()\n {\n   if [ -n \"${PROJECT_NAME_VAR}\" ];\n   then\n-    kubectl rollout status deployment ${PROJECT_NAME_VAR}\n+\n+    interval=1 #1 second\n+    rollout_status_raw & CPID=$!\n+\n+    ((t = $DEPLOY_TIMEOUT_VAR ))\n+\n+      while ((t > 0));\n+        do\n+          if [ -n \"$(ps -p ${CPID} -o pid=)\" ]\n+            then\n+              sleep $interval;\n+              ((t -= $interval))\n+            else\n+              exit 0;\n+          fi\n+        done\n+\n+    rollout_status_error $CPID;\n+\n   else\n     echo \"ERROR: needs project_name - $0 -h for usage\";\n   fi;\n   exit;\n }\n \n \n+function rollout_status_raw()\n+{\n+  kubectl rollout status deployment ${PROJECT_NAME_VAR}\n+}\n+\n+\n+function rollout_status_error()\n+{\n+  if [ -n \"$(ps -p $1 -o pid=)\" ]\n+    then\n+      rollout_status_error_info;\n+      echo \"INFO: Killing deployment process as is timed out\";\n+      kill -s SIGTERM $1 && kill -0 $1 || exit 0\n+      sleep 5;\n+      kill -s SIGKILL $1\n+    else\n+     exit;\n+fi;\n+}\n+\n+\n+function rollout_status_error_info(){\n+\n+  kubectl get pods --selector=app=${PROJECT_NAME_VAR} --no-headers=true |  \\","path":"smith.sh","position":105,"original_position":105,"commit_id":"85b1a0a539ee1b1b8c4dedc2fc65a14efb09f146","original_commit_id":"85b1a0a539ee1b1b8c4dedc2fc65a14efb09f146","user":{"login":"artworx","id":1954578,"avatar_url":"https://avatars2.githubusercontent.com/u/1954578?v=4","gravatar_id":"","url":"https://api.github.com/users/artworx","html_url":"https://github.com/artworx","followers_url":"https://api.github.com/users/artworx/followers","following_url":"https://api.github.com/users/artworx/following{/other_user}","gists_url":"https://api.github.com/users/artworx/gists{/gist_id}","starred_url":"https://api.github.com/users/artworx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artworx/subscriptions","organizations_url":"https://api.github.com/users/artworx/orgs","repos_url":"https://api.github.com/users/artworx/repos","events_url":"https://api.github.com/users/artworx/events{/privacy}","received_events_url":"https://api.github.com/users/artworx/received_events","type":"User","site_admin":false},"body":"consider using `go-template` output instead of all this logic\r\n\r\n`kubectl get pods --selector=app=camversity-session -o go-template='{{range .items}}{{if ne .status.phase \"Running\"}} {{.metadata.name}} {{.status.phase}}{{\"\\n\"}}{{end}}{{end}}'`\r\n\r\n","created_at":"2018-02-28T08:10:08Z","updated_at":"2018-02-28T08:10:09Z","html_url":"https://github.com/Camversity/cli/pull/4#discussion_r171166913","pull_request_url":"https://api.github.com/repos/Camversity/cli/pulls/4","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Camversity/cli/pulls/comments/171166913"},"html":{"href":"https://github.com/Camversity/cli/pull/4#discussion_r171166913"},"pull_request":{"href":"https://api.github.com/repos/Camversity/cli/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Camversity/cli/pulls/4","id":171694724,"html_url":"https://github.com/Camversity/cli/pull/4","diff_url":"https://github.com/Camversity/cli/pull/4.diff","patch_url":"https://github.com/Camversity/cli/pull/4.patch","issue_url":"https://api.github.com/repos/Camversity/cli/issues/4","number":4,"state":"open","locked":false,"title":"Feature extended info","user":{"login":"ai-neamtu","id":33018255,"avatar_url":"https://avatars1.githubusercontent.com/u/33018255?v=4","gravatar_id":"","url":"https://api.github.com/users/ai-neamtu","html_url":"https://github.com/ai-neamtu","followers_url":"https://api.github.com/users/ai-neamtu/followers","following_url":"https://api.github.com/users/ai-neamtu/following{/other_user}","gists_url":"https://api.github.com/users/ai-neamtu/gists{/gist_id}","starred_url":"https://api.github.com/users/ai-neamtu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ai-neamtu/subscriptions","organizations_url":"https://api.github.com/users/ai-neamtu/orgs","repos_url":"https://api.github.com/users/ai-neamtu/repos","events_url":"https://api.github.com/users/ai-neamtu/events{/privacy}","received_events_url":"https://api.github.com/users/ai-neamtu/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-27T15:23:44Z","updated_at":"2018-02-28T08:10:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6875e8414854a7c6636051afaf11d7f3515eeaab","assignee":null,"assignees":[],"requested_reviewers":[{"login":"aduzsardi","id":3455034,"avatar_url":"https://avatars1.githubusercontent.com/u/3455034?v=4","gravatar_id":"","url":"https://api.github.com/users/aduzsardi","html_url":"https://github.com/aduzsardi","followers_url":"https://api.github.com/users/aduzsardi/followers","following_url":"https://api.github.com/users/aduzsardi/following{/other_user}","gists_url":"https://api.github.com/users/aduzsardi/gists{/gist_id}","starred_url":"https://api.github.com/users/aduzsardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduzsardi/subscriptions","organizations_url":"https://api.github.com/users/aduzsardi/orgs","repos_url":"https://api.github.com/users/aduzsardi/repos","events_url":"https://api.github.com/users/aduzsardi/events{/privacy}","received_events_url":"https://api.github.com/users/aduzsardi/received_events","type":"User","site_admin":false},{"login":"AdrianBalcan","id":5767735,"avatar_url":"https://avatars3.githubusercontent.com/u/5767735?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrianBalcan","html_url":"https://github.com/AdrianBalcan","followers_url":"https://api.github.com/users/AdrianBalcan/followers","following_url":"https://api.github.com/users/AdrianBalcan/following{/other_user}","gists_url":"https://api.github.com/users/AdrianBalcan/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianBalcan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianBalcan/subscriptions","organizations_url":"https://api.github.com/users/AdrianBalcan/orgs","repos_url":"https://api.github.com/users/AdrianBalcan/repos","events_url":"https://api.github.com/users/AdrianBalcan/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianBalcan/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Camversity/cli/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Camversity/cli/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Camversity/cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Camversity/cli/issues/4/comments","statuses_url":"https://api.github.com/repos/Camversity/cli/statuses/85b1a0a539ee1b1b8c4dedc2fc65a14efb09f146","head":{"label":"Camversity:feature_extended_info","ref":"feature_extended_info","sha":"85b1a0a539ee1b1b8c4dedc2fc65a14efb09f146","user":{"login":"Camversity","id":29934371,"avatar_url":"https://avatars2.githubusercontent.com/u/29934371?v=4","gravatar_id":"","url":"https://api.github.com/users/Camversity","html_url":"https://github.com/Camversity","followers_url":"https://api.github.com/users/Camversity/followers","following_url":"https://api.github.com/users/Camversity/following{/other_user}","gists_url":"https://api.github.com/users/Camversity/gists{/gist_id}","starred_url":"https://api.github.com/users/Camversity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Camversity/subscriptions","organizations_url":"https://api.github.com/users/Camversity/orgs","repos_url":"https://api.github.com/users/Camversity/repos","events_url":"https://api.github.com/users/Camversity/events{/privacy}","received_events_url":"https://api.github.com/users/Camversity/received_events","type":"Organization","site_admin":false},"repo":{"id":111110895,"name":"cli","full_name":"Camversity/cli","owner":{"login":"Camversity","id":29934371,"avatar_url":"https://avatars2.githubusercontent.com/u/29934371?v=4","gravatar_id":"","url":"https://api.github.com/users/Camversity","html_url":"https://github.com/Camversity","followers_url":"https://api.github.com/users/Camversity/followers","following_url":"https://api.github.com/users/Camversity/following{/other_user}","gists_url":"https://api.github.com/users/Camversity/gists{/gist_id}","starred_url":"https://api.github.com/users/Camversity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Camversity/subscriptions","organizations_url":"https://api.github.com/users/Camversity/orgs","repos_url":"https://api.github.com/users/Camversity/repos","events_url":"https://api.github.com/users/Camversity/events{/privacy}","received_events_url":"https://api.github.com/users/Camversity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Camversity/cli","description":null,"fork":false,"url":"https://api.github.com/repos/Camversity/cli","forks_url":"https://api.github.com/repos/Camversity/cli/forks","keys_url":"https://api.github.com/repos/Camversity/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Camversity/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Camversity/cli/teams","hooks_url":"https://api.github.com/repos/Camversity/cli/hooks","issue_events_url":"https://api.github.com/repos/Camversity/cli/issues/events{/number}","events_url":"https://api.github.com/repos/Camversity/cli/events","assignees_url":"https://api.github.com/repos/Camversity/cli/assignees{/user}","branches_url":"https://api.github.com/repos/Camversity/cli/branches{/branch}","tags_url":"https://api.github.com/repos/Camversity/cli/tags","blobs_url":"https://api.github.com/repos/Camversity/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Camversity/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Camversity/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Camversity/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Camversity/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Camversity/cli/languages","stargazers_url":"https://api.github.com/repos/Camversity/cli/stargazers","contributors_url":"https://api.github.com/repos/Camversity/cli/contributors","subscribers_url":"https://api.github.com/repos/Camversity/cli/subscribers","subscription_url":"https://api.github.com/repos/Camversity/cli/subscription","commits_url":"https://api.github.com/repos/Camversity/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Camversity/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Camversity/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Camversity/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Camversity/cli/contents/{+path}","compare_url":"https://api.github.com/repos/Camversity/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Camversity/cli/merges","archive_url":"https://api.github.com/repos/Camversity/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Camversity/cli/downloads","issues_url":"https://api.github.com/repos/Camversity/cli/issues{/number}","pulls_url":"https://api.github.com/repos/Camversity/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Camversity/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Camversity/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Camversity/cli/labels{/name}","releases_url":"https://api.github.com/repos/Camversity/cli/releases{/id}","deployments_url":"https://api.github.com/repos/Camversity/cli/deployments","created_at":"2017-11-17T14:12:33Z","updated_at":"2017-11-17T15:13:26Z","pushed_at":"2018-02-27T15:23:45Z","git_url":"git://github.com/Camversity/cli.git","ssh_url":"git@github.com:Camversity/cli.git","clone_url":"https://github.com/Camversity/cli.git","svn_url":"https://github.com/Camversity/cli","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Camversity:master","ref":"master","sha":"7484d3e75da84deeab8bb602909a20d0e676892d","user":{"login":"Camversity","id":29934371,"avatar_url":"https://avatars2.githubusercontent.com/u/29934371?v=4","gravatar_id":"","url":"https://api.github.com/users/Camversity","html_url":"https://github.com/Camversity","followers_url":"https://api.github.com/users/Camversity/followers","following_url":"https://api.github.com/users/Camversity/following{/other_user}","gists_url":"https://api.github.com/users/Camversity/gists{/gist_id}","starred_url":"https://api.github.com/users/Camversity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Camversity/subscriptions","organizations_url":"https://api.github.com/users/Camversity/orgs","repos_url":"https://api.github.com/users/Camversity/repos","events_url":"https://api.github.com/users/Camversity/events{/privacy}","received_events_url":"https://api.github.com/users/Camversity/received_events","type":"Organization","site_admin":false},"repo":{"id":111110895,"name":"cli","full_name":"Camversity/cli","owner":{"login":"Camversity","id":29934371,"avatar_url":"https://avatars2.githubusercontent.com/u/29934371?v=4","gravatar_id":"","url":"https://api.github.com/users/Camversity","html_url":"https://github.com/Camversity","followers_url":"https://api.github.com/users/Camversity/followers","following_url":"https://api.github.com/users/Camversity/following{/other_user}","gists_url":"https://api.github.com/users/Camversity/gists{/gist_id}","starred_url":"https://api.github.com/users/Camversity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Camversity/subscriptions","organizations_url":"https://api.github.com/users/Camversity/orgs","repos_url":"https://api.github.com/users/Camversity/repos","events_url":"https://api.github.com/users/Camversity/events{/privacy}","received_events_url":"https://api.github.com/users/Camversity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Camversity/cli","description":null,"fork":false,"url":"https://api.github.com/repos/Camversity/cli","forks_url":"https://api.github.com/repos/Camversity/cli/forks","keys_url":"https://api.github.com/repos/Camversity/cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Camversity/cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Camversity/cli/teams","hooks_url":"https://api.github.com/repos/Camversity/cli/hooks","issue_events_url":"https://api.github.com/repos/Camversity/cli/issues/events{/number}","events_url":"https://api.github.com/repos/Camversity/cli/events","assignees_url":"https://api.github.com/repos/Camversity/cli/assignees{/user}","branches_url":"https://api.github.com/repos/Camversity/cli/branches{/branch}","tags_url":"https://api.github.com/repos/Camversity/cli/tags","blobs_url":"https://api.github.com/repos/Camversity/cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Camversity/cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Camversity/cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Camversity/cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Camversity/cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Camversity/cli/languages","stargazers_url":"https://api.github.com/repos/Camversity/cli/stargazers","contributors_url":"https://api.github.com/repos/Camversity/cli/contributors","subscribers_url":"https://api.github.com/repos/Camversity/cli/subscribers","subscription_url":"https://api.github.com/repos/Camversity/cli/subscription","commits_url":"https://api.github.com/repos/Camversity/cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Camversity/cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Camversity/cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Camversity/cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Camversity/cli/contents/{+path}","compare_url":"https://api.github.com/repos/Camversity/cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Camversity/cli/merges","archive_url":"https://api.github.com/repos/Camversity/cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Camversity/cli/downloads","issues_url":"https://api.github.com/repos/Camversity/cli/issues{/number}","pulls_url":"https://api.github.com/repos/Camversity/cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Camversity/cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Camversity/cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Camversity/cli/labels{/name}","releases_url":"https://api.github.com/repos/Camversity/cli/releases{/id}","deployments_url":"https://api.github.com/repos/Camversity/cli/deployments","created_at":"2017-11-17T14:12:33Z","updated_at":"2017-11-17T15:13:26Z","pushed_at":"2018-02-27T15:23:45Z","git_url":"git://github.com/Camversity/cli.git","ssh_url":"git@github.com:Camversity/cli.git","clone_url":"https://github.com/Camversity/cli.git","svn_url":"https://github.com/Camversity/cli","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Camversity/cli/pulls/4"},"html":{"href":"https://github.com/Camversity/cli/pull/4"},"issue":{"href":"https://api.github.com/repos/Camversity/cli/issues/4"},"comments":{"href":"https://api.github.com/repos/Camversity/cli/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Camversity/cli/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Camversity/cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Camversity/cli/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Camversity/cli/statuses/85b1a0a539ee1b1b8c4dedc2fc65a14efb09f146"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"artworx"}}