{"action":"created","comment":{"url":"https://api.github.com/repos/firstlookmedia/deployables/pulls/comments/223453640","pull_request_review_id":162583885,"id":223453640,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMzQ1MzY0MA==","diff_hunk":"@@ -83,600 +99,829 @@ region=${DEPLOY_AWS_REGION}\n output=json\n EOH\n \n-    if [[ $? != 0 ]] ; then\n-        echo \"Error updating aws config, DEPLOY_AWS_CONFIG=${DEPLOY_AWS_CONFIG}\"\n-        exit 1\n-    fi\n+  if [[ $? != 0 ]] ; then\n+    echo \"Error updating aws config, DEPLOY_AWS_CONFIG=${DEPLOY_AWS_CONFIG}\"\n+    exit 1\n+  fi\n+\n+  cat $( eval echo -n $DEPLOY_AWS_CONFIG )\n \n-    aws_configure_done=1\n+  aws_configure_done=1\n }\n \n-function ecr_login () {\n+function aws_test_profile {\n+  aws_configure\n+  aws --profile=${DEPLOY_AWS_PROFILE} s3 ls\n+}\n \n-    echo\n-    echo Logging in to ECR\n-    echo DEPLOY_AWS_PROFILE: ${DEPLOY_AWS_PROFILE}\n-    echo DEPLOY_AWS_ACCOUNT: ${DEPLOY_AWS_ACCOUNT}\n-    echo DEPLOY_ECR_ACCOUNT: ${DEPLOY_ECR_ACCOUNT}\n-    echo\n+function aws_run () {\n+  aws_configure\n+  aws --profile=${DEPLOY_AWS_PROFILE} ${@:1}\n+}\n \n-\t# check environment variables\n-\tcheck_environment\n+function ecr_login () {\n+  echo\n+  echo Logging in to ECR\n+  echo DEPLOY_AWS_PROFILE: ${DEPLOY_AWS_PROFILE}\n+  echo DEPLOY_AWS_ACCOUNT: ${DEPLOY_AWS_ACCOUNT}\n+  echo DEPLOY_ECR_ACCOUNT: ${DEPLOY_ECR_ACCOUNT}\n+  echo\n+\n+  # check environment variables\n+  check_environment\n+\n+  # Newer versions of docker don't work well with the default login args to aws-cli\n+  email=\"\"\n+  if [[ $(docker --version | grep -i version) =~ 1(7|8)\\. ]]; then\n+    echo \"Adding email remove flag\"\n+    email=\"--no-include-email\"\n+  fi\n \n-\tlogin_command=$(\n-\t\taws --profile=${DEPLOY_AWS_PROFILE} ecr get-login\n-\t)\n+  login_command=$(\n+    aws --profile=${DEPLOY_AWS_PROFILE} ecr get-login $email\n+  )\n \n-\tif [[ ! \"$login_command\" =~ \"https://${DEPLOY_AWS_ACCOUNT}\" ]]; then\n-\t\techo Error: Login command does not match DEPLOY_AWS_ACCOUNT: ${DEPLOY_AWS_ACCOUNT}\n-\t\techo Error: Check that DEPLOY_AWS_ROLE=\"${DEPLOY_AWS_ROLE}\" is as valid role in DEPLOY_AWS_ACCOUNT=\"${DEPLOY_AWS_ACCOUNT}\"\n-\t\techo login_command: ${login_command}\n-\t\treturn 1\n-\tfi\n+  if [[ ! \"$login_command\" =~ \"https://${DEPLOY_AWS_ACCOUNT}\" ]]; then\n+    echo Error: Login command does not match DEPLOY_AWS_ACCOUNT: ${DEPLOY_AWS_ACCOUNT}\n+    echo Error: Check that DEPLOY_AWS_ROLE=\"${DEPLOY_AWS_ROLE}\" is as valid role in DEPLOY_AWS_ACCOUNT=\"${DEPLOY_AWS_ACCOUNT}\"\n+    echo login_command: ${login_command}\n+    return 1\n+  fi\n \n-     login_command=$(\n-    \techo ${login_command} \\\n-        | sed -e \"s/${DEPLOY_AWS_ACCOUNT}/${DEPLOY_ECR_ACCOUNT}/\"\n-    )\n+  login_command=$(\n+    echo ${login_command} \\\n+    | sed \"s/${DEPLOY_AWS_ACCOUNT}/${DEPLOY_ECR_ACCOUNT}/\"\n+  )\n \n-\tif [[ ! \"$login_command\" =~ \"https://${DEPLOY_ECR_ACCOUNT}\" ]]; then\n-\t\techo Error: Login command does not match DEPLOY_ECR_ACCOUNT: ${DEPLOY_ECR_ACCOUNT}\n-\t\techo login_command: ${login_command}\n-\t\treturn 1\n-\tfi\n+  if [[ ! \"$login_command\" =~ \"https://${DEPLOY_ECR_ACCOUNT}\" ]]; then\n+    echo Error: Login command does not match DEPLOY_ECR_ACCOUNT: ${DEPLOY_ECR_ACCOUNT}\n+    echo login_command: ${login_command}\n+    return 1\n+  fi\n \n-\teval ${login_command}\n+  eval ${login_command}\n }\n \n function ecr_tag_image () {\n \n-    local base_tag=$1\n-    local target_tag=$2\n+  local base_tag=$1\n+  local target_tag=$2\n \n-    echo\n-    echo Tagging image\n-    echo base_tag: ${base_tag}\n-    echo target_tag: ${target_tag}\n-    echo\n+  echo\n+  echo Tagging image\n+  echo base_tag: ${base_tag}\n+  echo target_tag: ${target_tag}\n+  echo\n \n-\tif [[ -z \"${base_tag}\" || -z \"${target_tag}\" ]] ; then\n-\t\techo \"Error: usage: ecr_tag_image <$base_tag> <target_tag>\"\n-\t\treturn 1\n-\tfi\n+  if [[ -z \"${base_tag}\" || -z \"${target_tag}\" ]] ; then\n+    echo \"Error: usage: ecr_tag_image <$base_tag> <target_tag>\"\n+    return 1\n+  fi\n \n-    docker tag $base_tag $target_tag\n+  docker tag $base_tag $target_tag\n \n-    if [[ \"$?\" == 1 ]] ; then\n-    \techo \"Error tagging target_tag=${target_tag}\"\n-    \treturn 1\n-    fi\n+  if [[ \"$?\" == 1 ]] ; then\n+    echo \"Error tagging target_tag=${target_tag}\"\n+    return 1\n+  fi\n \n }\n \n function ecr_pull_image () {\n \n-    local remote_tag=$1\n+  local remote_tag=$1\n \n-    echo\n-    echo Pulling and Retagging image\n-    echo remote_tag: ${remote_tag}\n-    echo\n+  echo\n+  echo Pulling and Retagging image\n+  echo remote_tag: ${remote_tag}\n+  echo\n \n-\tif [[ -z \"${remote_tag}\" ]] ; then\n-\t\techo \"Error: usage: ecr_pull_and_retag_image <$remote_tag>\"\n-\t\treturn 1\n-\tfi\n+  if [[ -z \"${remote_tag}\" ]] ; then\n+    echo \"Error: usage: ecr_pull_and_retag_image <$remote_tag>\"\n+    return 1\n+  fi\n \n-    docker pull $remote_tag\n+  docker pull $remote_tag\n \n-    if [[ \"$?\" == 1 ]] ; then\n-    \techo \"Error pulling remote_tag=${remote_tag}\"\n-    \treturn 1\n-    fi\n+  if [[ \"$?\" == 1 ]] ; then\n+    echo \"Error pulling remote_tag=${remote_tag}\"\n+    return 1\n+  fi\n \n }\n \n function ecr_push_image () {\n \n-    local image=$1\n+  local image=$1\n \n-    echo\n-    echo Pushing image\n-    echo image: ${image}\n-    echo\n+  echo\n+  echo Pushing image\n+  echo image: ${image}\n+  echo\n \n-    docker push $image\n+  docker push $image\n \n-    if [ $? != 0 ] ; then\n-        echo \"Error: Unable to push image, ${image}\"\n-        exit 1\n-    fi\n+  if [ $? != 0 ] ; then\n+    echo \"Error: Unable to push image, ${image}\"\n+    exit 1\n+  fi\n \n }\n \n function ecs_deploy_task () {\n \n-    local image=\"$1\"\n-    local subfamily=\"$2\"\n+  local image_tag=\"$1\"\n+  local subfamily=\"$2\"\n+  local image=\"${DEPLOY_ECR_HOST}/${DEPLOY_APP_NAME}:${image_tag}\"\n \n-    echo\n-    echo Deploying ECS task\n-    echo image: ${image}\n-    echo subfamily: ${subfamily}\n-    echo\n+  echo\n+  echo Deploying ECS task\n+  echo image: ${image}\n+  echo subfamily: ${subfamily}\n+  echo\n \n-    if [ -z \"$subfamily\" ] ; then\n-        family=\"${DEPLOY_APP_NAME}\"\n-        service=\"${DEPLOY_APP_NAME}\"\n-    else\n-        family=\"${DEPLOY_APP_NAME}-${subfamily}\"\n-        service=\"${DEPLOY_APP_NAME}-${subfamily}\"\n-    fi\n+  if [ -z \"$subfamily\" ] ; then\n+    family=\"${DEPLOY_APP_NAME}\"\n+  else\n+    family=\"${DEPLOY_APP_NAME}-${subfamily}\"\n+  fi\n+  service=\"${family}\"\n+\n+  echo\n+  echo \"Remembering current task definition, family: ${family}\"\n+  echo\n+\n+  previous_version=$( \\\n+    aws ecs describe-services \\\n+    --profile ${DEPLOY_AWS_PROFILE} \\\n+    --cluster ${DEPLOY_ECS_CLUSTER_NAME} \\\n+    --services ${service} \\\n+    | $JQ '.services[0].taskDefinition' \\\n+    )\n \n-    echo\n-    echo \"Remembering current task definition, family: ${family}\"\n-    echo\n+  echo\n+  echo \"Registering new task definition, family: ${family}\"\n+  echo\n+\n+  task_def_template=${DEPLOY_TASK_DEF_TEMPLATE//-FAMILY/-$subfamily}\n \n-    previous_version=$( \\\n-        aws ecs describe-services \\\n-            --profile ${DEPLOY_AWS_PROFILE} \\\n-            --cluster ${DEPLOY_ECS_CLUSTER_NAME} \\\n-            --services ${service} \\\n-            | $JQ '.services[0].taskDefinition' \\\n+  if [[ ! -f ${task_def_template} ]] ; then\n+    echo \"Unable to find task definition template, task_def_template: ${task_def_template}\"\n+    exit 1\n+  fi\n+\n+  task_def=$( \\\n+    DEPLOY_IMAGE_NAME=${image} \\\n+    DEPLOY_IMAGE_TAG=${image_tag} \\\n+    DEPLOY_ECS_CLUSTER_NAME=${DEPLOY_ECS_CLUSTER_NAME} \\\n+    DEPLOY_SUBFAMILY=${subfamily} \\\n+    DEPLOY_AWS_REGION=${DEPLOY_AWS_REGION} \\\n+    DEPLOY_APP_NAME=${family} \\\n+    ${DEPLOY_ENVSUBST_COMMAND:-envsubst} < \"${task_def_template}\"\n+  )\n+\n+  if [[ -n \"${DEPLOY_YAHTZEE_VARS}\" ]]; then\n+    echo \"Task Def before Yahtzee: $(echo $task_def | $JQ .)\"\n+\n+    new_task_def=$( \\\n+      echo ${task_def} | \\\n+      curl -sL -d @- -H \"cookie: auth_token=${DEPLOY_YAHTZEE_AUTH_TOKEN}\" \\\n+      \"https://${DEPLOY_YAHTZEE_DOMAIN}/services/${DEPLOY_ECS_CLUSTER_NAME}/${DEPLOY_APP_NAME}/vars/json\"\n     )\n \n-    echo\n-    echo \"Registering new task definition, family: ${family}\"\n-    echo\n+    task_def=\"${new_task_def}\"\n+  fi\n \n-    task_def_template=${DEPLOY_TASK_DEF_TEMPLATE//-FAMILY/-$subfamily}\n+  echo \"Deploying Task Def: $(echo $task_def | $JQ .)\"\n+\n+  if [[ -z \"${DEPLOY_TASK_ROLE_ARN}\" ]] ; then\n+    revision_target=$( \\\n+      aws ecs register-task-definition \\\n+      --profile ${DEPLOY_AWS_PROFILE} \\\n+      --container-definitions \"$task_def\" \\\n+      --family \"${family}\" \\\n+      | $JQ '.taskDefinition.taskDefinitionArn' \\\n+      )\n+  else\n+    revision_target=$( \\\n+      aws ecs register-task-definition \\\n+      --profile ${DEPLOY_AWS_PROFILE} \\\n+      --task-role-arn \"${DEPLOY_TASK_ROLE_ARN}\" \\\n+      --container-definitions \"$task_def\" \\\n+      --family \"${family}\" \\\n+      | $JQ '.taskDefinition.taskDefinitionArn' \\\n+      )\n+  fi\n+\n+  if [ -z \"$revision_target\" ] ; then\n+    echo \"Failed to register task definition\"\n+    exit 1\n+  fi\n+  echo \"Target Revision: $revision_target\"\n \n-    if [[ ! -f ${task_def_template} ]] ; then\n-        echo \"Unable to find task definition template, task_def_template: ${task_def_template}\"\n-        exit 1\n-    fi\n \n-    task_def=$( \\\n-        DEPLOY_IMAGE_NAME=${image} \\\n-        DEPLOY_ECS_CLUSTER_NAME=${DEPLOY_ECS_CLUSTER_NAME} \\\n-        DEPLOY_SUBFAMILY=${subfamily} \\\n-        DEPLOY_AWS_REGION=${DEPLOY_AWS_REGION} \\\n-        ${DEPLOY_ENVSUBST_COMMAND:-envsubst} < \"${task_def_template}\"\n+  if [ ! -z \"${DEPLOY_NO_SERVICE}\" ] ; then\n+    exit\n+  fi\n+\n+  echo\n+  echo Updating service\n+  echo service: ${service}\n+  echo revision_target: ${revision_target}\n+  echo\n+\n+  revision_actual=$( \\\n+    aws ecs update-service \\\n+    --profile ${DEPLOY_AWS_PROFILE} \\\n+    --cluster ${DEPLOY_ECS_CLUSTER_NAME} \\\n+    --service ${service} \\\n+    --task-definition $revision_target \\\n+    | $JQ '.service.taskDefinition' \\\n     )\n \n-    if [[ -z \"${DEPLOY_TASK_ROLE_ARN}\" ]] ; then\n-        revision_target=$( \\\n-            aws ecs register-task-definition \\\n-                --profile ${DEPLOY_AWS_PROFILE} \\\n-                --container-definitions \"$task_def\" \\\n-                --family \"${family}\" \\\n-                | $JQ '.taskDefinition.taskDefinitionArn' \\\n-        )\n-    else\n-        revision_target=$( \\\n-            aws ecs register-task-definition \\\n-                --profile ${DEPLOY_AWS_PROFILE} \\\n-                --task-role-arn \"${DEPLOY_TASK_ROLE_ARN}\" \\\n-                --container-definitions \"$task_def\" \\\n-                --family \"${family}\" \\\n-                | $JQ '.taskDefinition.taskDefinitionArn' \\\n-        )\n-    fi\n+  if [ \"$revision_target\" != \"$revision_actual\" ] ; then\n+    echo \"Error updating service. Target does not match actual: ${revision_target} != ${revision_actual} \"\n+    exit 1\n+  fi\n \n-    if [ -z \"$revision_target\" ] ; then\n-        echo \"Failed to register task definition\"\n-        exit 1\n-    fi\n-    echo \"Target Revision: $revision_target\"\n+  # part one of some bash craziness to pass the revision_target\n+  key=\"revision_target_$( echo $family | tr -s - _ )\"\n+  eval \"$key=${revision_target}\"\n+  echo key : $key : ${!key}\n \n-    echo\n-    echo Updating service\n-    echo service: ${service}\n-    echo revision_target: ${revision_target}\n-    echo\n+}\n+\n+function ecs_verify_deploy () {\n+\n+  local subfamily=\"$1\"\n+\n+  if [ -z \"$subfamily\" ] ; then\n+    family=\"${DEPLOY_APP_NAME}\"\n+    service=\"${DEPLOY_APP_NAME}\"\n+  else\n+    family=\"${DEPLOY_APP_NAME}-${subfamily}\"\n+    service=\"${DEPLOY_APP_NAME}-${subfamily}\"\n+  fi\n \n-    revision_actual=$( \\\n-        aws ecs update-service \\\n-            --profile ${DEPLOY_AWS_PROFILE} \\\n-            --cluster ${DEPLOY_ECS_CLUSTER_NAME} \\\n-            --service ${service} \\\n-            --task-definition $revision_target \\\n-            | $JQ '.service.taskDefinition' \\\n-        )\n-\n-    if [ \"$revision_target\" != \"$revision_actual\" ] ; then\n-        echo \"Error updating service. Target does not match actual: ${revision_target} != ${revision_actual} \"\n-        exit 1\n+  # part two of some bash craziness to receive the revision_target\n+  key=\"revision_target_$( echo $family | tr -s - _ )\"\n+  revision_target=${!key}\n+\n+  echo\n+  echo Verifying deploy\n+  echo revision_target: $revision_target\n+  echo\n+\n+  # wait for older revisions to disappear\n+  for attempt in {1..100}; do\n+\n+    revision_deployed=$( \\\n+      aws ecs describe-services \\\n+      --profile ${DEPLOY_AWS_PROFILE} \\\n+      --cluster ${DEPLOY_ECS_CLUSTER_NAME} \\\n+      --services ${service} \\\n+      | $JQ \".services[0].deployments | .[] | select(.taskDefinition != \\\"$revision_target\\\") | .taskDefinition\" \\\n+      )\n+\n+    if [ -z \"$revision_deployed\" ] ; then\n+      echo \"Success: Deployed!\"\n+      return 0\n     fi\n \n-    # part one of some bash craziness to pass the revision_target\n-    key=\"revision_target_$( echo $family | tr -s - _ )\"\n-    eval \"$key=${revision_target}\"\n-    echo key : $key : ${!key}\n+    echo \"Waiting for update:\"\n+    echo \"  revision_target: ${revision_target}\"\n+    echo \"  revision_deployed: ${revision_deployed}\"\n+    sleep 6\n+\n+  done\n \n+  echo \"Error: Service update took too long.\"\n+  exit 1\n }\n \n-function ecs_verify_deploy () {\n \n-    local subfamily=\"$1\"\n+##\n+## public functions\n+##\n \n-    if [ -z \"$subfamily\" ] ; then\n-        family=\"${DEPLOY_APP_NAME}\"\n-        service=\"${DEPLOY_APP_NAME}\"\n-    else\n-        family=\"${DEPLOY_APP_NAME}-${subfamily}\"\n-        service=\"${DEPLOY_APP_NAME}-${subfamily}\"\n-    fi\n+function docker_build {\n \n-    # part two of some bash craziness to receive the revision_target\n-    key=\"revision_target_$( echo $family | tr -s - _ )\"\n-    revision_target=${!key}\n+  echo\n+  echo Building docker image\n+  echo DEPLOY_DOCKERFILE: ${DEPLOY_DOCKERFILE}\n+  echo DEPLOY_DOCKER_LOCAL_TAG: ${DEPLOY_DOCKER_LOCAL_TAG}\n+  echo\n \n-    echo\n-    echo Verifying deploy\n-    echo revision_target: $revision_target\n-    echo\n+  if [ -z \"${DEPLOY_DOCKERFILE}\" ] ; then\n+    echo \"Error: DEPLOY_DOCKERFILE is required\"\n+    return 1\n+  fi\n \n-    # wait for older revisions to disappear\n-    for attempt in {1..60}; do\n+  if [ -z \"${DEPLOY_DOCKER_LOCAL_TAG}\" ] ; then\n+    echo \"Error: DEPLOY_DOCKER_LOCAL_TAG is required\"\n+    return 1\n+  fi\n \n-        revision_deployed=$( \\\n-            aws ecs describe-services \\\n-                --profile ${DEPLOY_AWS_PROFILE} \\\n-                --cluster ${DEPLOY_ECS_CLUSTER_NAME} \\\n-                --services ${service} \\\n-                | $JQ \".services[0].deployments | .[] | select(.taskDefinition != \\\"$revision_target\\\") | .taskDefinition\" \\\n-            )\n+  if [[ ! -z \"${DEPLOY_GITHUB_MACHINE_USER_KEY_FINGERPRINT}\" ]] ; then\n \n-        if [ -z \"$revision_deployed\" ] ; then\n-            echo \"Success: Deployed!\"\n-            return 0\n-        fi\n+    fingerprint=\"$( echo ${DEPLOY_GITHUB_MACHINE_USER_KEY_FINGERPRINT} | tr -d : )\"\n \n-        echo \"Waiting for update:\"\n-        echo \"  revision_target: ${revision_target}\"\n-        echo \"  revision_deployed: ${revision_deployed}\"\n-        sleep 5\n+    eval keyfile=\"~/.ssh/id_${fingerprint}\"\n \n-    done\n+    if [[ ! -f ${keyfile} ]] ; then\n+      echo \"Error: Unable to find machine user key file\"\n+      echo \"- fingerprint: ${fingerprint}\"\n+      echo \"- keyfile: ${keyfile}\"\n+\n+      eval keyfile=\"~/.ssh/id_circleci_github\"\n+\n+      if [[ ! -f ${keyfile} ]] ; then\n+        echo \"Error: Unable to find circle github key file\"\n+        echo \"- keyfile: ${keyfile}\"\n+        return 1\n+      fi\n+\n+    fi\n+\n+    echo \"Using GITHUB_MACHINE_USER_KEY=${keyfile}\"\n+\n+    docker build \\\n+      --rm=false \\\n+      --no-cache \\","path":"bin/deployables","position":646,"original_position":646,"commit_id":"326995172907cd0fbce2d17a106a95524b8845d2","original_commit_id":"326995172907cd0fbce2d17a106a95524b8845d2","user":{"login":"icco","id":20201,"node_id":"MDQ6VXNlcjIwMjAx","avatar_url":"https://avatars1.githubusercontent.com/u/20201?v=4","gravatar_id":"","url":"https://api.github.com/users/icco","html_url":"https://github.com/icco","followers_url":"https://api.github.com/users/icco/followers","following_url":"https://api.github.com/users/icco/following{/other_user}","gists_url":"https://api.github.com/users/icco/gists{/gist_id}","starred_url":"https://api.github.com/users/icco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icco/subscriptions","organizations_url":"https://api.github.com/users/icco/orgs","repos_url":"https://api.github.com/users/icco/repos","events_url":"https://api.github.com/users/icco/events{/privacy}","received_events_url":"https://api.github.com/users/icco/received_events","type":"User","site_admin":false},"body":"Oh, whoa. That's not good.","created_at":"2018-10-08T18:12:39Z","updated_at":"2018-10-08T18:15:13Z","html_url":"https://github.com/firstlookmedia/deployables/pull/5#discussion_r223453640","pull_request_url":"https://api.github.com/repos/firstlookmedia/deployables/pulls/5","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/firstlookmedia/deployables/pulls/comments/223453640"},"html":{"href":"https://github.com/firstlookmedia/deployables/pull/5#discussion_r223453640"},"pull_request":{"href":"https://api.github.com/repos/firstlookmedia/deployables/pulls/5"}},"in_reply_to_id":223431454},"pull_request":{"url":"https://api.github.com/repos/firstlookmedia/deployables/pulls/5","id":115200853,"node_id":"MDExOlB1bGxSZXF1ZXN0MTE1MjAwODUz","html_url":"https://github.com/firstlookmedia/deployables/pull/5","diff_url":"https://github.com/firstlookmedia/deployables/pull/5.diff","patch_url":"https://github.com/firstlookmedia/deployables/pull/5.patch","issue_url":"https://api.github.com/repos/firstlookmedia/deployables/issues/5","number":5,"state":"open","locked":false,"title":"Refactor Deployables Script","user":{"login":"icco","id":20201,"node_id":"MDQ6VXNlcjIwMjAx","avatar_url":"https://avatars1.githubusercontent.com/u/20201?v=4","gravatar_id":"","url":"https://api.github.com/users/icco","html_url":"https://github.com/icco","followers_url":"https://api.github.com/users/icco/followers","following_url":"https://api.github.com/users/icco/following{/other_user}","gists_url":"https://api.github.com/users/icco/gists{/gist_id}","starred_url":"https://api.github.com/users/icco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icco/subscriptions","organizations_url":"https://api.github.com/users/icco/orgs","repos_url":"https://api.github.com/users/icco/repos","events_url":"https://api.github.com/users/icco/events{/privacy}","received_events_url":"https://api.github.com/users/icco/received_events","type":"User","site_admin":false},"body":"This fixes deployables for circleci 2.0 by creating the aws dir if it doesn't exist.\r\n\r\nAlso, this makes all of the whitespace consistent in the file because mixed spaces and tabs were killing me.\r\n\r\nAlso, it merges in Brian's refactor that seperates deploying the image and updating a service into two steps, but keeps the API the same.\r\n\r\nAlso, it ups the service update step timeout to 10 minutes from 5.\r\n\r\nAlso, fixes family support so we can deploy to separate sub services by specifying a subfamily. See https://github.com/firstlookmedia/helloworld/blob/7a4df9daa2b789b79fd041b2bcef6c7885e468d7/circle.yml#L31 for an example.\r\n\r\nRun `git diff -w origin/master...origin/nw/fix-circle-20` for a slightly easier to read diff.","created_at":"2017-04-10T21:56:15Z","updated_at":"2018-10-08T18:15:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5b4b7cd5272d9fb97e3a1f5db31ecd2b70cd7cf6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jefforulez","id":1448616,"node_id":"MDQ6VXNlcjE0NDg2MTY=","avatar_url":"https://avatars3.githubusercontent.com/u/1448616?v=4","gravatar_id":"","url":"https://api.github.com/users/jefforulez","html_url":"https://github.com/jefforulez","followers_url":"https://api.github.com/users/jefforulez/followers","following_url":"https://api.github.com/users/jefforulez/following{/other_user}","gists_url":"https://api.github.com/users/jefforulez/gists{/gist_id}","starred_url":"https://api.github.com/users/jefforulez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jefforulez/subscriptions","organizations_url":"https://api.github.com/users/jefforulez/orgs","repos_url":"https://api.github.com/users/jefforulez/repos","events_url":"https://api.github.com/users/jefforulez/events{/privacy}","received_events_url":"https://api.github.com/users/jefforulez/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/firstlookmedia/deployables/pulls/5/commits","review_comments_url":"https://api.github.com/repos/firstlookmedia/deployables/pulls/5/comments","review_comment_url":"https://api.github.com/repos/firstlookmedia/deployables/pulls/comments{/number}","comments_url":"https://api.github.com/repos/firstlookmedia/deployables/issues/5/comments","statuses_url":"https://api.github.com/repos/firstlookmedia/deployables/statuses/326995172907cd0fbce2d17a106a95524b8845d2","head":{"label":"firstlookmedia:nw/fix-circle-20","ref":"nw/fix-circle-20","sha":"326995172907cd0fbce2d17a106a95524b8845d2","user":{"login":"firstlookmedia","id":16566963,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTY2OTYz","avatar_url":"https://avatars3.githubusercontent.com/u/16566963?v=4","gravatar_id":"","url":"https://api.github.com/users/firstlookmedia","html_url":"https://github.com/firstlookmedia","followers_url":"https://api.github.com/users/firstlookmedia/followers","following_url":"https://api.github.com/users/firstlookmedia/following{/other_user}","gists_url":"https://api.github.com/users/firstlookmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/firstlookmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firstlookmedia/subscriptions","organizations_url":"https://api.github.com/users/firstlookmedia/orgs","repos_url":"https://api.github.com/users/firstlookmedia/repos","events_url":"https://api.github.com/users/firstlookmedia/events{/privacy}","received_events_url":"https://api.github.com/users/firstlookmedia/received_events","type":"Organization","site_admin":false},"repo":{"id":71296922,"node_id":"MDEwOlJlcG9zaXRvcnk3MTI5NjkyMg==","name":"deployables","full_name":"firstlookmedia/deployables","private":false,"owner":{"login":"firstlookmedia","id":16566963,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTY2OTYz","avatar_url":"https://avatars3.githubusercontent.com/u/16566963?v=4","gravatar_id":"","url":"https://api.github.com/users/firstlookmedia","html_url":"https://github.com/firstlookmedia","followers_url":"https://api.github.com/users/firstlookmedia/followers","following_url":"https://api.github.com/users/firstlookmedia/following{/other_user}","gists_url":"https://api.github.com/users/firstlookmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/firstlookmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firstlookmedia/subscriptions","organizations_url":"https://api.github.com/users/firstlookmedia/orgs","repos_url":"https://api.github.com/users/firstlookmedia/repos","events_url":"https://api.github.com/users/firstlookmedia/events{/privacy}","received_events_url":"https://api.github.com/users/firstlookmedia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/firstlookmedia/deployables","description":":wastebasket: a basket of deploy scripts","fork":false,"url":"https://api.github.com/repos/firstlookmedia/deployables","forks_url":"https://api.github.com/repos/firstlookmedia/deployables/forks","keys_url":"https://api.github.com/repos/firstlookmedia/deployables/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firstlookmedia/deployables/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firstlookmedia/deployables/teams","hooks_url":"https://api.github.com/repos/firstlookmedia/deployables/hooks","issue_events_url":"https://api.github.com/repos/firstlookmedia/deployables/issues/events{/number}","events_url":"https://api.github.com/repos/firstlookmedia/deployables/events","assignees_url":"https://api.github.com/repos/firstlookmedia/deployables/assignees{/user}","branches_url":"https://api.github.com/repos/firstlookmedia/deployables/branches{/branch}","tags_url":"https://api.github.com/repos/firstlookmedia/deployables/tags","blobs_url":"https://api.github.com/repos/firstlookmedia/deployables/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firstlookmedia/deployables/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firstlookmedia/deployables/git/refs{/sha}","trees_url":"https://api.github.com/repos/firstlookmedia/deployables/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firstlookmedia/deployables/statuses/{sha}","languages_url":"https://api.github.com/repos/firstlookmedia/deployables/languages","stargazers_url":"https://api.github.com/repos/firstlookmedia/deployables/stargazers","contributors_url":"https://api.github.com/repos/firstlookmedia/deployables/contributors","subscribers_url":"https://api.github.com/repos/firstlookmedia/deployables/subscribers","subscription_url":"https://api.github.com/repos/firstlookmedia/deployables/subscription","commits_url":"https://api.github.com/repos/firstlookmedia/deployables/commits{/sha}","git_commits_url":"https://api.github.com/repos/firstlookmedia/deployables/git/commits{/sha}","comments_url":"https://api.github.com/repos/firstlookmedia/deployables/comments{/number}","issue_comment_url":"https://api.github.com/repos/firstlookmedia/deployables/issues/comments{/number}","contents_url":"https://api.github.com/repos/firstlookmedia/deployables/contents/{+path}","compare_url":"https://api.github.com/repos/firstlookmedia/deployables/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firstlookmedia/deployables/merges","archive_url":"https://api.github.com/repos/firstlookmedia/deployables/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firstlookmedia/deployables/downloads","issues_url":"https://api.github.com/repos/firstlookmedia/deployables/issues{/number}","pulls_url":"https://api.github.com/repos/firstlookmedia/deployables/pulls{/number}","milestones_url":"https://api.github.com/repos/firstlookmedia/deployables/milestones{/number}","notifications_url":"https://api.github.com/repos/firstlookmedia/deployables/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firstlookmedia/deployables/labels{/name}","releases_url":"https://api.github.com/repos/firstlookmedia/deployables/releases{/id}","deployments_url":"https://api.github.com/repos/firstlookmedia/deployables/deployments","created_at":"2016-10-18T22:31:50Z","updated_at":"2018-06-10T06:18:27Z","pushed_at":"2018-10-05T19:59:27Z","git_url":"git://github.com/firstlookmedia/deployables.git","ssh_url":"git@github.com:firstlookmedia/deployables.git","clone_url":"https://github.com/firstlookmedia/deployables.git","svn_url":"https://github.com/firstlookmedia/deployables","homepage":"","size":135,"stargazers_count":6,"watchers_count":6,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":6,"default_branch":"master"}},"base":{"label":"firstlookmedia:master","ref":"master","sha":"816e9975354b0e9ea693cd638473e3d77e9bb6b2","user":{"login":"firstlookmedia","id":16566963,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTY2OTYz","avatar_url":"https://avatars3.githubusercontent.com/u/16566963?v=4","gravatar_id":"","url":"https://api.github.com/users/firstlookmedia","html_url":"https://github.com/firstlookmedia","followers_url":"https://api.github.com/users/firstlookmedia/followers","following_url":"https://api.github.com/users/firstlookmedia/following{/other_user}","gists_url":"https://api.github.com/users/firstlookmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/firstlookmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firstlookmedia/subscriptions","organizations_url":"https://api.github.com/users/firstlookmedia/orgs","repos_url":"https://api.github.com/users/firstlookmedia/repos","events_url":"https://api.github.com/users/firstlookmedia/events{/privacy}","received_events_url":"https://api.github.com/users/firstlookmedia/received_events","type":"Organization","site_admin":false},"repo":{"id":71296922,"node_id":"MDEwOlJlcG9zaXRvcnk3MTI5NjkyMg==","name":"deployables","full_name":"firstlookmedia/deployables","private":false,"owner":{"login":"firstlookmedia","id":16566963,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2NTY2OTYz","avatar_url":"https://avatars3.githubusercontent.com/u/16566963?v=4","gravatar_id":"","url":"https://api.github.com/users/firstlookmedia","html_url":"https://github.com/firstlookmedia","followers_url":"https://api.github.com/users/firstlookmedia/followers","following_url":"https://api.github.com/users/firstlookmedia/following{/other_user}","gists_url":"https://api.github.com/users/firstlookmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/firstlookmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firstlookmedia/subscriptions","organizations_url":"https://api.github.com/users/firstlookmedia/orgs","repos_url":"https://api.github.com/users/firstlookmedia/repos","events_url":"https://api.github.com/users/firstlookmedia/events{/privacy}","received_events_url":"https://api.github.com/users/firstlookmedia/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/firstlookmedia/deployables","description":":wastebasket: a basket of deploy scripts","fork":false,"url":"https://api.github.com/repos/firstlookmedia/deployables","forks_url":"https://api.github.com/repos/firstlookmedia/deployables/forks","keys_url":"https://api.github.com/repos/firstlookmedia/deployables/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firstlookmedia/deployables/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firstlookmedia/deployables/teams","hooks_url":"https://api.github.com/repos/firstlookmedia/deployables/hooks","issue_events_url":"https://api.github.com/repos/firstlookmedia/deployables/issues/events{/number}","events_url":"https://api.github.com/repos/firstlookmedia/deployables/events","assignees_url":"https://api.github.com/repos/firstlookmedia/deployables/assignees{/user}","branches_url":"https://api.github.com/repos/firstlookmedia/deployables/branches{/branch}","tags_url":"https://api.github.com/repos/firstlookmedia/deployables/tags","blobs_url":"https://api.github.com/repos/firstlookmedia/deployables/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firstlookmedia/deployables/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firstlookmedia/deployables/git/refs{/sha}","trees_url":"https://api.github.com/repos/firstlookmedia/deployables/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firstlookmedia/deployables/statuses/{sha}","languages_url":"https://api.github.com/repos/firstlookmedia/deployables/languages","stargazers_url":"https://api.github.com/repos/firstlookmedia/deployables/stargazers","contributors_url":"https://api.github.com/repos/firstlookmedia/deployables/contributors","subscribers_url":"https://api.github.com/repos/firstlookmedia/deployables/subscribers","subscription_url":"https://api.github.com/repos/firstlookmedia/deployables/subscription","commits_url":"https://api.github.com/repos/firstlookmedia/deployables/commits{/sha}","git_commits_url":"https://api.github.com/repos/firstlookmedia/deployables/git/commits{/sha}","comments_url":"https://api.github.com/repos/firstlookmedia/deployables/comments{/number}","issue_comment_url":"https://api.github.com/repos/firstlookmedia/deployables/issues/comments{/number}","contents_url":"https://api.github.com/repos/firstlookmedia/deployables/contents/{+path}","compare_url":"https://api.github.com/repos/firstlookmedia/deployables/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firstlookmedia/deployables/merges","archive_url":"https://api.github.com/repos/firstlookmedia/deployables/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firstlookmedia/deployables/downloads","issues_url":"https://api.github.com/repos/firstlookmedia/deployables/issues{/number}","pulls_url":"https://api.github.com/repos/firstlookmedia/deployables/pulls{/number}","milestones_url":"https://api.github.com/repos/firstlookmedia/deployables/milestones{/number}","notifications_url":"https://api.github.com/repos/firstlookmedia/deployables/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firstlookmedia/deployables/labels{/name}","releases_url":"https://api.github.com/repos/firstlookmedia/deployables/releases{/id}","deployments_url":"https://api.github.com/repos/firstlookmedia/deployables/deployments","created_at":"2016-10-18T22:31:50Z","updated_at":"2018-06-10T06:18:27Z","pushed_at":"2018-10-05T19:59:27Z","git_url":"git://github.com/firstlookmedia/deployables.git","ssh_url":"git@github.com:firstlookmedia/deployables.git","clone_url":"https://github.com/firstlookmedia/deployables.git","svn_url":"https://github.com/firstlookmedia/deployables","homepage":"","size":135,"stargazers_count":6,"watchers_count":6,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firstlookmedia/deployables/pulls/5"},"html":{"href":"https://github.com/firstlookmedia/deployables/pull/5"},"issue":{"href":"https://api.github.com/repos/firstlookmedia/deployables/issues/5"},"comments":{"href":"https://api.github.com/repos/firstlookmedia/deployables/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/firstlookmedia/deployables/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/firstlookmedia/deployables/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/firstlookmedia/deployables/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/firstlookmedia/deployables/statuses/326995172907cd0fbce2d17a106a95524b8845d2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"icco"}}