{"action":"created","issue":{"url":"https://api.github.com/repos/jenkinsci/ssh-steps-plugin/issues/3","repository_url":"https://api.github.com/repos/jenkinsci/ssh-steps-plugin","labels_url":"https://api.github.com/repos/jenkinsci/ssh-steps-plugin/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/jenkinsci/ssh-steps-plugin/issues/3/comments","events_url":"https://api.github.com/repos/jenkinsci/ssh-steps-plugin/issues/3/events","html_url":"https://github.com/jenkinsci/ssh-steps-plugin/pull/3","id":338732212,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk5NTkyMjkz","number":3,"title":"JENKINS-52390 Throw appropriate error when the code is not in node block","user":{"login":"nrayapati","id":4974191,"node_id":"MDQ6VXNlcjQ5NzQxOTE=","avatar_url":"https://avatars0.githubusercontent.com/u/4974191?v=4","gravatar_id":"","url":"https://api.github.com/users/nrayapati","html_url":"https://github.com/nrayapati","followers_url":"https://api.github.com/users/nrayapati/followers","following_url":"https://api.github.com/users/nrayapati/following{/other_user}","gists_url":"https://api.github.com/users/nrayapati/gists{/gist_id}","starred_url":"https://api.github.com/users/nrayapati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrayapati/subscriptions","organizations_url":"https://api.github.com/users/nrayapati/orgs","repos_url":"https://api.github.com/users/nrayapati/repos","events_url":"https://api.github.com/users/nrayapati/events{/privacy}","received_events_url":"https://api.github.com/users/nrayapati/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-05T21:30:04Z","updated_at":"2018-07-05T21:34:33Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/jenkinsci/ssh-steps-plugin/pulls/3","html_url":"https://github.com/jenkinsci/ssh-steps-plugin/pull/3","diff_url":"https://github.com/jenkinsci/ssh-steps-plugin/pull/3.diff","patch_url":"https://github.com/jenkinsci/ssh-steps-plugin/pull/3.patch"},"body":"# Description\r\n- Update examples to have node.\r\n- Throw appropriate error when the code is not in node block. \r\n\r\nSee [JENKINS-52390](https://issues.jenkins-ci.org/browse/JENKINS-52390)."},"comment":{"url":"https://api.github.com/repos/jenkinsci/ssh-steps-plugin/issues/comments/402859162","html_url":"https://github.com/jenkinsci/ssh-steps-plugin/pull/3#issuecomment-402859162","issue_url":"https://api.github.com/repos/jenkinsci/ssh-steps-plugin/issues/3","id":402859162,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjg1OTE2Mg==","user":{"login":"nrayapati","id":4974191,"node_id":"MDQ6VXNlcjQ5NzQxOTE=","avatar_url":"https://avatars0.githubusercontent.com/u/4974191?v=4","gravatar_id":"","url":"https://api.github.com/users/nrayapati","html_url":"https://github.com/nrayapati","followers_url":"https://api.github.com/users/nrayapati/followers","following_url":"https://api.github.com/users/nrayapati/following{/other_user}","gists_url":"https://api.github.com/users/nrayapati/gists{/gist_id}","starred_url":"https://api.github.com/users/nrayapati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nrayapati/subscriptions","organizations_url":"https://api.github.com/users/nrayapati/orgs","repos_url":"https://api.github.com/users/nrayapati/repos","events_url":"https://api.github.com/users/nrayapati/events{/privacy}","received_events_url":"https://api.github.com/users/nrayapati/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T21:34:33Z","updated_at":"2018-07-05T21:34:33Z","author_association":"MEMBER","body":"Instead of throwing java.lang.NullPointerException, it would now throw a valid error message when t\r\n\r\n*Before*: 👎 \r\n```java\r\n[Pipeline] stage\r\n[Pipeline] { (Remote SSH)\r\n[Pipeline] sshCommand\r\n[Pipeline] }\r\n[Pipeline] // stage\r\n[Pipeline] End of Pipeline\r\n[Office365connector] No webhooks to notify\r\njava.lang.NullPointerException\r\n\tat org.jenkinsci.plugins.sshsteps.steps.CommandStep$Execution.run(CommandStep.java:71)\r\n\tat org.jenkinsci.plugins.sshsteps.util.SSHStepExecution$1$1.call(SSHStepExecution.java:77)\r\n\tat hudson.security.ACL.impersonate(ACL.java:290)\r\n\tat org.jenkinsci.plugins.sshsteps.util.SSHStepExecution$1.run(SSHStepExecution.java:72)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nFinished: FAILURE\r\n```\r\n\r\n*After*: 👍 \r\n```java\r\n[Pipeline] stage\r\n[Pipeline] { (Remote SSH)\r\n[Pipeline] sshCommand\r\nRequired context class hudson.Launcher is missing\r\nPerhaps you forgot to surround the code with a step that provides this, such as: node\r\n[Pipeline] }\r\n[Pipeline] // stage\r\n[Pipeline] End of Pipeline\r\n[Office365connector] No webhooks to notify\r\norg.jenkinsci.plugins.workflow.steps.MissingContextVariableException: Required context class hudson.Launcher is missing\r\n\tat org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:260)\r\n\tat org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:206)\r\n\tat org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153)\r\n```"}}
{"actor":{"display_login":"nrayapati"}}