<commit_before>sudo: required

services:
  - docker

language: ruby

script:
  - docker images

env:
    global:
        - DOCKER_ENGINE_VERSION=1.11.2
        - DOCKER_COMPOSE_VERSION=1.7.1
        - DOCKER_MACHINE_VERSION=0.7.0
        - APP_DOCKER_DIR=${TRAVIS_BUILD_DIR}/app/docker

before_install:
    # what am I on?
    - uname -a
    - uname -r
    - lsb_release -a

    # list docker-engine versions
    - apt-cache madison docker-engine

    # upgrade docker-engine to specific version
    - sudo apt-get -qq update
    - openssl version -a
    - sudo apt-get install -y openssl
    - openssl version -a
    - sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_ENGINE_VERSION}-0~trusty

    # reinstall docker-compose at specific version
    - sudo rm /usr/local/bin/docker-compose
    - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
    - chmod +x docker-compose
    - sudo mv docker-compose /usr/local/bin

    # install docker-machine at specific version
    - curl -L https://github.com/docker/machine/releases/download/v{DOCKER_COMPOSE_VERSION}/docker-machine-`uname -s`-`uname -m` > docker-machine
    - chmod +x docker-machine
    - sudo mv docker-machine /usr/local/bin

    # smoke test
    - sudo docker run hello-world

script:
    - docker version
    - docker-compose version
    #- docker-machine version
    - docker images
    # Build the cyber-dojo images
    - cd ${APP_DOCKER_DIR}/nginx
    - ./build-image.sh
    - cd ${APP_DOCKER_DIR}/user-base
    - ./build-image.sh
    - cd ${APP_DOCKER_DIR}/web
    - ./build-image.sh ${DOCKER_ENGINE_VERSION}
    - cd ${APP_DOCKER_DIR}
    - ./cyber-dojo up
    - cid=`docker ps --all --quiet --filter "name=cdf-web"`
    - echo ${cid}
    - docker --debug exec ${cid} sh -c "cd test && ./run.sh"<commit_msg>trying pause before running docker exec<commit_after>sudo: required

services:
  - docker

language: ruby

script:
  - docker images

env:
    global:
        - DOCKER_ENGINE_VERSION=1.11.2
        - DOCKER_COMPOSE_VERSION=1.7.1
        - DOCKER_MACHINE_VERSION=0.7.0
        - APP_DOCKER_DIR=${TRAVIS_BUILD_DIR}/app/docker

before_install:
    # what am I on?
    - uname -a
    - uname -r
    - lsb_release -a

    # list docker-engine versions
    - apt-cache madison docker-engine

    # upgrade docker-engine to specific version
    - sudo apt-get -qq update
    - sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_ENGINE_VERSION}-0~trusty

    # reinstall docker-compose at specific version
    - sudo rm /usr/local/bin/docker-compose
    - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
    - chmod +x docker-compose
    - sudo mv docker-compose /usr/local/bin

    # install docker-machine at specific version
    - curl -L https://github.com/docker/machine/releases/download/v{DOCKER_COMPOSE_VERSION}/docker-machine-`uname -s`-`uname -m` > docker-machine
    - chmod +x docker-machine
    - sudo mv docker-machine /usr/local/bin

    # smoke test
    - sudo docker run hello-world

script:
    - docker version
    - docker-compose version
    #- docker-machine version
    - docker images
    # Build the cyber-dojo images
    - cd ${APP_DOCKER_DIR}/nginx
    - ./build-image.sh
    - cd ${APP_DOCKER_DIR}/user-base
    - ./build-image.sh
    - cd ${APP_DOCKER_DIR}/web
    - ./build-image.sh ${DOCKER_ENGINE_VERSION}
    - cd ${APP_DOCKER_DIR}
    - ./cyber-dojo up
    - cid=`docker ps --all --quiet --filter "name=cdf-web"`
    - echo ${cid}
    - sleep 5
    - docker --debug exec ${cid} sh -c "cd test && ./run.sh"
{'fraction_non_alphanumeric': 0.12659574468085105, 'fraction_numerical': 0.006117021276595745, 'mean_word_length': 2.4536271808999084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6662191', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1319, 'n_words': 291}