{"action":"created","comment":{"url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/comments/77305003","id":77305003,"diff_hunk":"@@ -0,0 +1,37 @@\n+/*\n+ * The MIT License\n+ *\n+ * Copyright (c) 2016, CloudBees, Inc.\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included in\n+ * all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n+ * THE SOFTWARE.\n+ */\n+\n+pipeline {\n+    agent none\n+    stages {\n+        stage(\"foo\") {\n+            echo \"hello\"\n+            parallel([a: \"echo '1'\",\n+                      b: \"echo '2'\"])\n+        }","path":"src/test/resources/errors/rejectParallelMixedInSteps.groovy","position":32,"original_position":32,"commit_id":"5fda77d85e40106cb45966087e5c092faedc6dd8","original_commit_id":"5fda77d85e40106cb45966087e5c092faedc6dd8","user":{"login":"batmat","id":223853,"avatar_url":"https://avatars.githubusercontent.com/u/223853?v=3","gravatar_id":"","url":"https://api.github.com/users/batmat","html_url":"https://github.com/batmat","followers_url":"https://api.github.com/users/batmat/followers","following_url":"https://api.github.com/users/batmat/following{/other_user}","gists_url":"https://api.github.com/users/batmat/gists{/gist_id}","starred_url":"https://api.github.com/users/batmat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/batmat/subscriptions","organizations_url":"https://api.github.com/users/batmat/orgs","repos_url":"https://api.github.com/users/batmat/repos","events_url":"https://api.github.com/users/batmat/events{/privacy}","received_events_url":"https://api.github.com/users/batmat/received_events","type":"User","site_admin":false},"body":"Just tested and \r\n```\r\nparallel (\r\n    bim: {\r\n        echo \"hey\"    \r\n    },\r\n    bam: {\r\n        echo \"hoo\"    \r\n    }\r\n)\r\n```\r\n\r\n(without the [ ] around the map elements), and this seems to be working fine with raw pipeline. Is there a reason you didn't choose the same syntax (or maybe both are working, didn't try it)?","created_at":"2016-09-02T07:37:09Z","updated_at":"2016-09-02T07:37:09Z","html_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/2#discussion_r77305003","pull_request_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/comments/77305003"},"html":{"href":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/2#discussion_r77305003"},"pull_request":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/2","id":83642370,"html_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/2","diff_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/2.diff","patch_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/2.patch","issue_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/2","number":2,"state":"open","locked":false,"title":"[FIXED JENKINS-37828] Properly reject parallel","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"body":"[JENKINS-37828](https://issues.jenkins-ci.org/browse/JENKINS-37828)\r\n\r\nMore notably, reject it when it's not the only step in a block. In the\r\nJSON representation, we don't even use the term parallel - we just\r\nhave multiple branches. In the groovy parsing, we look for parallel as\r\nthe only step in a stage and treat it differently (resulting in\r\nmultiple branches). So any time we see parallel as a step by the time\r\nwe get to validation, well, it's wrong. So, yeah.\r\n\r\nAlso, tweaks to make sure we don't end up doing validation of steps we've already blacklisted, because that's silly.\r\n\r\ncc @reviewbybees @i386 @michaelneale @oleg-nenashev ","created_at":"2016-09-01T14:24:33Z","updated_at":"2016-09-02T07:37:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41dff3f4f0ee201b98ea7fb21b809e0f14a991fb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/2/commits","review_comments_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/2/comments","review_comment_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/2/comments","statuses_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/statuses/5fda77d85e40106cb45966087e5c092faedc6dd8","head":{"label":"abayer:jenkins-37828","ref":"jenkins-37828","sha":"5fda77d85e40106cb45966087e5c092faedc6dd8","user":{"login":"abayer","id":120218,"avatar_url":"https://avatars.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"repo":{"id":66791984,"name":"pipeline-model-definition-plugin","full_name":"abayer/pipeline-model-definition-plugin","owner":{"login":"abayer","id":120218,"avatar_url":"https://avatars.githubusercontent.com/u/120218?v=3","gravatar_id":"","url":"https://api.github.com/users/abayer","html_url":"https://github.com/abayer","followers_url":"https://api.github.com/users/abayer/followers","following_url":"https://api.github.com/users/abayer/following{/other_user}","gists_url":"https://api.github.com/users/abayer/gists{/gist_id}","starred_url":"https://api.github.com/users/abayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abayer/subscriptions","organizations_url":"https://api.github.com/users/abayer/orgs","repos_url":"https://api.github.com/users/abayer/repos","events_url":"https://api.github.com/users/abayer/events{/privacy}","received_events_url":"https://api.github.com/users/abayer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abayer/pipeline-model-definition-plugin","description":null,"fork":true,"url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin","forks_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/forks","keys_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/teams","hooks_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/hooks","issue_events_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/events","assignees_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/tags","blobs_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/languages","stargazers_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/stargazers","contributors_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/contributors","subscribers_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/subscribers","subscription_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/subscription","commits_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/merges","archive_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/downloads","issues_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/labels{/name}","releases_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/abayer/pipeline-model-definition-plugin/deployments","created_at":"2016-08-28T21:35:16Z","updated_at":"2016-08-30T16:19:42Z","pushed_at":"2016-09-01T15:14:20Z","git_url":"git://github.com/abayer/pipeline-model-definition-plugin.git","ssh_url":"git@github.com:abayer/pipeline-model-definition-plugin.git","clone_url":"https://github.com/abayer/pipeline-model-definition-plugin.git","svn_url":"https://github.com/abayer/pipeline-model-definition-plugin","homepage":"","size":203,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jenkinsci:master","ref":"master","sha":"1ddd0ffd2c8a6ae5adebf71f2b81dcfd0177d4f1","user":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"repo":{"id":66677338,"name":"pipeline-model-definition-plugin","full_name":"jenkinsci/pipeline-model-definition-plugin","owner":{"login":"jenkinsci","id":107424,"avatar_url":"https://avatars.githubusercontent.com/u/107424?v=3","gravatar_id":"","url":"https://api.github.com/users/jenkinsci","html_url":"https://github.com/jenkinsci","followers_url":"https://api.github.com/users/jenkinsci/followers","following_url":"https://api.github.com/users/jenkinsci/following{/other_user}","gists_url":"https://api.github.com/users/jenkinsci/gists{/gist_id}","starred_url":"https://api.github.com/users/jenkinsci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jenkinsci/subscriptions","organizations_url":"https://api.github.com/users/jenkinsci/orgs","repos_url":"https://api.github.com/users/jenkinsci/repos","events_url":"https://api.github.com/users/jenkinsci/events{/privacy}","received_events_url":"https://api.github.com/users/jenkinsci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin","description":null,"fork":false,"url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin","forks_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/forks","keys_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/teams","hooks_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/hooks","issue_events_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/events{/number}","events_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/events","assignees_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/assignees{/user}","branches_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/branches{/branch}","tags_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/tags","blobs_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/refs{/sha}","trees_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/statuses/{sha}","languages_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/languages","stargazers_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/stargazers","contributors_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/contributors","subscribers_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/subscribers","subscription_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/subscription","commits_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/commits{/sha}","git_commits_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/git/commits{/sha}","comments_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/comments{/number}","issue_comment_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/comments{/number}","contents_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/contents/{+path}","compare_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/merges","archive_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/downloads","issues_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues{/number}","pulls_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls{/number}","milestones_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/milestones{/number}","notifications_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/labels{/name}","releases_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/releases{/id}","deployments_url":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/deployments","created_at":"2016-08-26T20:28:39Z","updated_at":"2016-08-30T16:17:48Z","pushed_at":"2016-09-01T21:56:22Z","git_url":"git://github.com/jenkinsci/pipeline-model-definition-plugin.git","ssh_url":"git@github.com:jenkinsci/pipeline-model-definition-plugin.git","clone_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin.git","svn_url":"https://github.com/jenkinsci/pipeline-model-definition-plugin","homepage":"","size":211,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/2"},"html":{"href":"https://github.com/jenkinsci/pipeline-model-definition-plugin/pull/2"},"issue":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/2"},"comments":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/jenkinsci/pipeline-model-definition-plugin/statuses/5fda77d85e40106cb45966087e5c092faedc6dd8"}}}}
{"actor":{"display_login":"batmat"}}