{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments/49759932","id":49759932,"diff_hunk":"@@ -171,10 +178,12 @@ class DefaultLaunchConfigurationBuilder implements LaunchConfigurationBuilder {\n \n   }\n \n-  private String getUserData(String asgName, String launchConfigName, String region, String account, String environment, String accountType) {\n+  private String getUserData(String asgName, String launchConfigName, String region, String account, String environment, String accountType, String base64UserData) {\n     String data = userDataProviders?.collect { udp ->\n       udp.getUserData(asgName, launchConfigName, region, account, environment, accountType)\n     }?.join(\"\\n\")\n+    String userDataDecoded = new String(base64UserData.decodeBase64())\n+    data = [data, userDataDecoded]?.join(\"\\n\")","path":"clouddriver-aws/src/main/groovy/com/netflix/spinnaker/clouddriver/aws/deploy/DefaultLaunchConfigurationBuilder.groovy","position":73,"original_position":73,"commit_id":"45b5f1100c52ebf09a869b876ccc45afb6b0f8ac","original_commit_id":"45b5f1100c52ebf09a869b876ccc45afb6b0f8ac","user":{"login":"cfieber","id":301292,"avatar_url":"https://avatars.githubusercontent.com/u/301292?v=3","gravatar_id":"","url":"https://api.github.com/users/cfieber","html_url":"https://github.com/cfieber","followers_url":"https://api.github.com/users/cfieber/followers","following_url":"https://api.github.com/users/cfieber/following{/other_user}","gists_url":"https://api.github.com/users/cfieber/gists{/gist_id}","starred_url":"https://api.github.com/users/cfieber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfieber/subscriptions","organizations_url":"https://api.github.com/users/cfieber/orgs","repos_url":"https://api.github.com/users/cfieber/repos","events_url":"https://api.github.com/users/cfieber/events{/privacy}","received_events_url":"https://api.github.com/users/cfieber/received_events","type":"User","site_admin":false},"body":"the `?.` here is not doing what you think. The list will never be null, but the items in it could be. Something like\r\n`[data, userDataDecoded].findResults { it }.join(\"\\n\")` would work","created_at":"2016-01-14T17:56:53Z","updated_at":"2016-01-14T17:56:53Z","html_url":"https://github.com/spinnaker/clouddriver/pull/237#discussion_r49759932","pull_request_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/237","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments/49759932"},"html":{"href":"https://github.com/spinnaker/clouddriver/pull/237#discussion_r49759932"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/237"}}},"pull_request":{"url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/237","id":54486285,"html_url":"https://github.com/spinnaker/clouddriver/pull/237","diff_url":"https://github.com/spinnaker/clouddriver/pull/237.diff","patch_url":"https://github.com/spinnaker/clouddriver/pull/237.patch","issue_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/237","number":237,"state":"open","locked":false,"title":"Add base64 encoded user data passed from amazon deploy description","user":{"login":"riltsken","id":180066,"avatar_url":"https://avatars.githubusercontent.com/u/180066?v=3","gravatar_id":"","url":"https://api.github.com/users/riltsken","html_url":"https://github.com/riltsken","followers_url":"https://api.github.com/users/riltsken/followers","following_url":"https://api.github.com/users/riltsken/following{/other_user}","gists_url":"https://api.github.com/users/riltsken/gists{/gist_id}","starred_url":"https://api.github.com/users/riltsken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riltsken/subscriptions","organizations_url":"https://api.github.com/users/riltsken/orgs","repos_url":"https://api.github.com/users/riltsken/repos","events_url":"https://api.github.com/users/riltsken/events{/privacy}","received_events_url":"https://api.github.com/users/riltsken/received_events","type":"User","site_admin":false},"body":"Reasoning:\r\nWe would like to pass User Data from an earlier stage in the pipeline to the deploy stage. This adds the ability to edit the pipeline json and add `\"base64UserData\": \"${userdata}\"` as a key value pair. The base64 user data is appended after the UserDataProviders sets up any default user data so it can be used to override these values.\r\n\r\nIt is base64 encoded because it is easier to handle as a serialized format when passing through json. Later on, a fancy UI could be built to add User Data as a text field. For now, advanced users can pass through the pipeline stages editing the json.","created_at":"2015-12-23T16:41:37Z","updated_at":"2016-01-14T17:56:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b2b0bccf9625a01b4e72779da03f8b5a9c9fe43","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/237/commits","review_comments_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/237/comments","review_comment_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/237/comments","statuses_url":"https://api.github.com/repos/spinnaker/clouddriver/statuses/45b5f1100c52ebf09a869b876ccc45afb6b0f8ac","head":{"label":"riltsken:add-userdata-to-aws-deploy-description","ref":"add-userdata-to-aws-deploy-description","sha":"45b5f1100c52ebf09a869b876ccc45afb6b0f8ac","user":{"login":"riltsken","id":180066,"avatar_url":"https://avatars.githubusercontent.com/u/180066?v=3","gravatar_id":"","url":"https://api.github.com/users/riltsken","html_url":"https://github.com/riltsken","followers_url":"https://api.github.com/users/riltsken/followers","following_url":"https://api.github.com/users/riltsken/following{/other_user}","gists_url":"https://api.github.com/users/riltsken/gists{/gist_id}","starred_url":"https://api.github.com/users/riltsken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riltsken/subscriptions","organizations_url":"https://api.github.com/users/riltsken/orgs","repos_url":"https://api.github.com/users/riltsken/repos","events_url":"https://api.github.com/users/riltsken/events{/privacy}","received_events_url":"https://api.github.com/users/riltsken/received_events","type":"User","site_admin":false},"repo":{"id":48395996,"name":"clouddriver","full_name":"riltsken/clouddriver","owner":{"login":"riltsken","id":180066,"avatar_url":"https://avatars.githubusercontent.com/u/180066?v=3","gravatar_id":"","url":"https://api.github.com/users/riltsken","html_url":"https://github.com/riltsken","followers_url":"https://api.github.com/users/riltsken/followers","following_url":"https://api.github.com/users/riltsken/following{/other_user}","gists_url":"https://api.github.com/users/riltsken/gists{/gist_id}","starred_url":"https://api.github.com/users/riltsken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riltsken/subscriptions","organizations_url":"https://api.github.com/users/riltsken/orgs","repos_url":"https://api.github.com/users/riltsken/repos","events_url":"https://api.github.com/users/riltsken/events{/privacy}","received_events_url":"https://api.github.com/users/riltsken/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/riltsken/clouddriver","description":"read and write operations across cloud providers","fork":true,"url":"https://api.github.com/repos/riltsken/clouddriver","forks_url":"https://api.github.com/repos/riltsken/clouddriver/forks","keys_url":"https://api.github.com/repos/riltsken/clouddriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riltsken/clouddriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riltsken/clouddriver/teams","hooks_url":"https://api.github.com/repos/riltsken/clouddriver/hooks","issue_events_url":"https://api.github.com/repos/riltsken/clouddriver/issues/events{/number}","events_url":"https://api.github.com/repos/riltsken/clouddriver/events","assignees_url":"https://api.github.com/repos/riltsken/clouddriver/assignees{/user}","branches_url":"https://api.github.com/repos/riltsken/clouddriver/branches{/branch}","tags_url":"https://api.github.com/repos/riltsken/clouddriver/tags","blobs_url":"https://api.github.com/repos/riltsken/clouddriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riltsken/clouddriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riltsken/clouddriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/riltsken/clouddriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riltsken/clouddriver/statuses/{sha}","languages_url":"https://api.github.com/repos/riltsken/clouddriver/languages","stargazers_url":"https://api.github.com/repos/riltsken/clouddriver/stargazers","contributors_url":"https://api.github.com/repos/riltsken/clouddriver/contributors","subscribers_url":"https://api.github.com/repos/riltsken/clouddriver/subscribers","subscription_url":"https://api.github.com/repos/riltsken/clouddriver/subscription","commits_url":"https://api.github.com/repos/riltsken/clouddriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/riltsken/clouddriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/riltsken/clouddriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/riltsken/clouddriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/riltsken/clouddriver/contents/{+path}","compare_url":"https://api.github.com/repos/riltsken/clouddriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riltsken/clouddriver/merges","archive_url":"https://api.github.com/repos/riltsken/clouddriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riltsken/clouddriver/downloads","issues_url":"https://api.github.com/repos/riltsken/clouddriver/issues{/number}","pulls_url":"https://api.github.com/repos/riltsken/clouddriver/pulls{/number}","milestones_url":"https://api.github.com/repos/riltsken/clouddriver/milestones{/number}","notifications_url":"https://api.github.com/repos/riltsken/clouddriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riltsken/clouddriver/labels{/name}","releases_url":"https://api.github.com/repos/riltsken/clouddriver/releases{/id}","created_at":"2015-12-21T21:50:43Z","updated_at":"2015-12-21T21:50:47Z","pushed_at":"2016-01-12T17:23:02Z","git_url":"git://github.com/riltsken/clouddriver.git","ssh_url":"git@github.com:riltsken/clouddriver.git","clone_url":"https://github.com/riltsken/clouddriver.git","svn_url":"https://github.com/riltsken/clouddriver","homepage":null,"size":24056,"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":"spinnaker:master","ref":"master","sha":"c0602d7a62e35fd1cad183fc015a9831657c4028","user":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":37556951,"name":"clouddriver","full_name":"spinnaker/clouddriver","owner":{"login":"spinnaker","id":7634182,"avatar_url":"https://avatars.githubusercontent.com/u/7634182?v=3","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spinnaker/clouddriver","description":"read and write operations across cloud providers","fork":false,"url":"https://api.github.com/repos/spinnaker/clouddriver","forks_url":"https://api.github.com/repos/spinnaker/clouddriver/forks","keys_url":"https://api.github.com/repos/spinnaker/clouddriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/clouddriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/clouddriver/teams","hooks_url":"https://api.github.com/repos/spinnaker/clouddriver/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/clouddriver/events","assignees_url":"https://api.github.com/repos/spinnaker/clouddriver/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/clouddriver/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/clouddriver/tags","blobs_url":"https://api.github.com/repos/spinnaker/clouddriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/clouddriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/clouddriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/clouddriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/clouddriver/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/clouddriver/languages","stargazers_url":"https://api.github.com/repos/spinnaker/clouddriver/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/clouddriver/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/clouddriver/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/clouddriver/subscription","commits_url":"https://api.github.com/repos/spinnaker/clouddriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/clouddriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/clouddriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/clouddriver/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/clouddriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/clouddriver/merges","archive_url":"https://api.github.com/repos/spinnaker/clouddriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/clouddriver/downloads","issues_url":"https://api.github.com/repos/spinnaker/clouddriver/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/clouddriver/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/clouddriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/clouddriver/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/clouddriver/releases{/id}","created_at":"2015-06-16T21:26:02Z","updated_at":"2016-01-12T09:25:29Z","pushed_at":"2016-01-13T21:30:40Z","git_url":"git://github.com/spinnaker/clouddriver.git","ssh_url":"git@github.com:spinnaker/clouddriver.git","clone_url":"https://github.com/spinnaker/clouddriver.git","svn_url":"https://github.com/spinnaker/clouddriver","homepage":null,"size":24118,"stargazers_count":26,"watchers_count":26,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":2,"forks":31,"open_issues":2,"watchers":26,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/237"},"html":{"href":"https://github.com/spinnaker/clouddriver/pull/237"},"issue":{"href":"https://api.github.com/repos/spinnaker/clouddriver/issues/237"},"comments":{"href":"https://api.github.com/repos/spinnaker/clouddriver/issues/237/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/237/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/237/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/clouddriver/statuses/45b5f1100c52ebf09a869b876ccc45afb6b0f8ac"}}}}