<commit_before>language: go
sudo: required
services:
  - docker

before_install:
  - docker pull golang:1.7.5
  - docker pull node:6.11.0-slim
  - docker pull f5devcentral/containthedocs

script:
  - set -e
  - docker run --rm -it -v `pwd`:`pwd` -w `pwd` node:6.11.0-slim build-tools/schema-tests.sh
  - if [ "$DOCKER_NAMESPACE" == "" ]; then DOCKER_NAMESPACE="local"; fi
  - BASE_PUSH_TARGET="$DOCKER_NAMESPACE/k8s-bigip-ctlr"
  - |
    if [ "$DOCKER_P" == "" -o "$DOCKER_U" == "" -o $DOCKER_NAMESPACE == "" ]; then
      echo "[INFO] Docker user, password, or namespace vars absent from travis-ci."
      echo "[INFO] See README.md section 'build' to configure travis with DockerHub."
    else
      docker login -u="$DOCKER_U" -p="$DOCKER_P"
      DOCKER_READY="true"
    fi
  - export BUILD_VERSION=$(build-tools/version-tool version)
  - export BUILD_INFO=$(build-tools/version-tool build-info)
  - if [ "$TRAVIS_TAG" == "$TRAVIS_BRANCH" ]; then BUILD_VERSION=$TRAVIS_TAG; fi
  - export IMG_TAG="${BASE_PUSH_TARGET}:${TRAVIS_COMMIT}"
  - export BUILD_IMG_TAG="${BASE_PUSH_TARGET}-devel:${TRAVIS_COMMIT}"
  - export BUILD_STAMP=devel-$TRAVIS_BRANCH-n-$TRAVIS_BUILD_NUMBER-id-$TRAVIS_BUILD_ID-$(date +%s)
  - export CLEAN_BUILD=true
  - export BASE_OS=alpine
  - make verify
  - make prod
  - docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH"
  - docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH-n-$TRAVIS_BUILD_NUMBER-id-$TRAVIS_BUILD_ID"
  - |
    if [ "$DOCKER_READY" ]; then
      docker tag "$IMG_TAG" "$BASE_PUSH_TARGET"
      docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH"
      docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:$BUILD_STAMP"
      docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:$BUILD_VERSION"<commit_msg>Added variable CTLR_VERSION to travis script<commit_after>language: go
sudo: required
services:
  - docker

before_install:
  - docker pull golang:1.7.5
  - docker pull node:6.11.0-slim
  - docker pull f5devcentral/containthedocs

script:
  - set -e
  - docker run --rm -it -v `pwd`:`pwd` -w `pwd` node:6.11.0-slim build-tools/schema-tests.sh
  - if [ "$DOCKER_NAMESPACE" == "" ]; then DOCKER_NAMESPACE="local"; fi
  - BASE_PUSH_TARGET="$DOCKER_NAMESPACE/k8s-bigip-ctlr"
  - |
    if [ "$DOCKER_P" == "" -o "$DOCKER_U" == "" -o $DOCKER_NAMESPACE == "" ]; then
      echo "[INFO] Docker user, password, or namespace vars absent from travis-ci."
      echo "[INFO] See README.md section 'build' to configure travis with DockerHub."
    else
      docker login -u="$DOCKER_U" -p="$DOCKER_P"
      DOCKER_READY="true"
    fi
  - export BUILD_VERSION=$(build-tools/version-tool version)
  - export BUILD_INFO=$(build-tools/version-tool build-info)
  - if [ "$TRAVIS_TAG" == "$TRAVIS_BRANCH" ]; then BUILD_VERSION=$TRAVIS_TAG; fi
  - export IMG_TAG="${BASE_PUSH_TARGET}:${TRAVIS_COMMIT}"
  - export BUILD_IMG_TAG="${BASE_PUSH_TARGET}-devel:${TRAVIS_COMMIT}"
  - export BUILD_STAMP=devel-$TRAVIS_BRANCH-n-$TRAVIS_BUILD_NUMBER-id-$TRAVIS_BUILD_ID-$(date +%s)
  - export CTLR_VERSION=$(echo $TRAVIS_BRANCH | sed s/-stable//g)
  - export CLEAN_BUILD=true
  - export BASE_OS=alpine
  - make verify
  - make prod
  - docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH"
  - docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH-n-$TRAVIS_BUILD_NUMBER-id-$TRAVIS_BUILD_ID"
  - |
    if [ "$DOCKER_READY" ]; then
      docker tag "$IMG_TAG" "$BASE_PUSH_TARGET"
      docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:devel-$TRAVIS_BRANCH"
      docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:$BUILD_STAMP"
      docker tag "$IMG_TAG" "$BASE_PUSH_TARGET:$BUILD_VERSION"
{'fraction_non_alphanumeric': 0.14846557920928946, 'fraction_numerical': 0.007188277578103401, 'mean_word_length': 4.053072625698324, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3972800', 'n_tokens_mistral': 1481, 'n_tokens_neox': 1431, 'n_words': 259}