<commit_before>#!/bin/bash

# Your boot2docker instance should already be running
# from ./start-in-boot2docker.sh

PROJ_NAME='tileserver'
PROJ_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
PROJ_TAG=$(git tag -l 2>/dev/null | tail -n 1)
PROJ_VER=$(echo $PROJ_TAG | sed 's/^v//')
REG_HOST=registry.docker.aws-us-west-2-infrastructure.socrata.net
REGISTRY=$REG_HOST:5000

cd $PROJ_ROOT

ping -c 2 $REG_HOST >/dev/null 2>/dev/null \
    || { echo "AWS VPN connection required to push image." ; exit ; }

boot2docker ssh <<EOF
  # Point docker at the registry.
  sudo /etc/init.d/docker stop
  sleep 2 # Give docker time to spin down.
  sudo sed -i '1s/$/\n\nEXTRA_ARGS="--insecure-registry registry.docker.aws-us-west-2-infrastructure.socrata.net:5000"\n/' /etc/init.d/docker
  sudo /etc/init.d/docker start
  sleep 2 # Give docker time to spin up.

  # Tag the image.<commit_msg>Add extra logging + sleep longer<commit_after>#!/bin/bash

# Your boot2docker instance should already be running
# from ./start-in-boot2docker.sh

PROJ_NAME='tileserver'
PROJ_ROOT=$(git rev-parse --show-toplevel 2>/dev/null)
PROJ_TAG=$(git tag -l 2>/dev/null | tail -n 1)
PROJ_VER=$(echo $PROJ_TAG | sed 's/^v//')
REG_HOST=registry.docker.aws-us-west-2-infrastructure.socrata.net
REGISTRY=$REG_HOST:5000

cd $PROJ_ROOT

ping -c 2 $REG_HOST >/dev/null 2>/dev/null \
    || { echo "AWS VPN connection required to push image." ; exit ; }

boot2docker ssh <<EOF
  set -v
  # Point docker at the registry.
  sudo /etc/init.d/docker stop
  sleep 2 # Give docker time to spin down.
  sudo sed -i '1s/$/\n\nEXTRA_ARGS="--insecure-registry registry.docker.aws-us-west-2-infrastructure.socrata.net:5000"\n/' /etc/init.d/docker
  sudo /etc/init.d/docker start
  sleep 5 # Give docker time to spin up.

  # Tag the image.
{'fraction_non_alphanumeric': 0.1441340782122905, 'fraction_numerical': 0.02346368715083799, 'mean_word_length': 3.580562659846547, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1647116', 'n_tokens_mistral': 728, 'n_tokens_neox': 659, 'n_words': 173}