<commit_before>language: scala

jdk: oraclejdk8

addons:
  chrome: stable

services:
  - docker

script:
  - sbt ciBuild

cache:
  directories:
    - .prereq-refs
    - "$HOME/.m2"
    - "$HOME/.ivy2"
    - "$HOME/.sbt"

before_install:
  - sudo apt-get update
  - sudo apt-get install graphviz
  - openssl aes-256-cbc -K $encrypted_e8464d595ae2_key -iv $encrypted_e8464d595ae2_iv -in .dropbox_uploader.enc -out $HOME/.dropbox_uploader -d

install:
  - wget -N http://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip -P ~/
  - unzip ~/chromedriver_linux64.zip -d ~/
  - sudo mkdir -p /opt
  - sudo mv -f ~/chromedriver /opt
  - sudo chmod +x /opt/chromedriver
  - sudo ln -s /opt/chromedriver /usr/local/bin/chromedriver

before_cache:
  - rm -Rf $HOME/.ivy2/.sbt.ivy.lock

env:
  global:
    - TEST_ONLINE="true"
    - DOCKER_HOST="unix:///var/run/docker.sock"
    # PGP_PASS
    - secure: "<KEY>
    # SONATYPE_USERNAME
    - secure: "<KEY>
    # SONATYPE_PASSWORD
    - secure: "<KEY>
    # CODACY_PROJECT_TOKEN
    - secure: "<KEY>
    # GITHUB_TOKEN
    - secure: "<KEY>
    # DOCKER_USERNAME
    - secure: "<KEY>
    # DOCKER_PASSWORD
    - secure: "<KEY>

stages:
  - name: VerifyPublish
    if: branch = publish AND type = push

#  - Prerequisites

  - Test

  - name: Deploy
    if: branch = publish AND type = push

  - name: Site
    if: branch = master AND type = push

  - name: BuildITest
    if: branch = master AND type = push

  - name: BuildUI
    if: branch = master AND type = push

#  - name: BuildPlugin
#    if: branch = master AND type = push

  - name: IntegrationTest
    if: branch = master AND type = push

jobs:
  include:
  # ------ Stage Verify publish
  - stage: VerifyPublish
    script: $TRAVIS_BUILD_DIR/scripts/verifyPublish.sh

  # ------ Stage Prerequisites
#  - stage: Prerequisites
#    script:
#      - sh -e scripts/build-prereq.sh sbt-testlogconfig
#      - sh -e scripts/build-prereq.sh sbt-jbake
#      - sh -e scripts/build-prereq.sh sbt-filterresources
#      - sh -e scripts/build-prereq.sh sbt-phoenix
#      - sh -e scripts/build-prereq.sh sbt-blendedbuild

  # ------ Stage Test
  - stage: Test
    before_script:
      - bash $TRAVIS_BUILD_DIR/scripts/checkScripts.sh
      - bash $TRAVIS_BUILD_DIR/scripts/dropbox_uploader.sh list
    #- bash $TRAVIS_BUILD_DIR/scripts/build-akka.sh
    script:
      - sbt clean update publishLocal publishM2 unidoc cleanCoverage
    after_failure:
      - bash $TRAVIS_BUILD_DIR/scripts/upload-results.sh
    after_success:
      - bash $TRAVIS_BUILD_DIR/scripts/upload-results.sh

  # ------ Stage Deploy
  - stage: Deploy
    script:
      - bash $TRAVIS_BUILD_DIR/scripts/runPublish.sh

  # ------ Build the integration test support
  - stage: BuildITest
    script:
      - bash $TRAVIS_BUILD_DIR/scripts/buildITest.sh

  # ------ Build and test the management UI
  - stage: BuildUI
    script:
      - bash $TRAVIS_BUILD_DIR/scripts/buildUI.sh

  # ------ Build Updater Maven Plugin
#  - stage: BuildPlugin
#    script:
#      - bash $TRAVIS_BUILD_DIR/scripts/updaterMavenPlugin.sh

  # ------ Stage Docker Images
  - stage: IntegrationTest
    name: blendedItestNode
    before_script:
      - git clone --branch master --depth 1 https://github.com/woq-blended/blended.container.git $TRAVIS_BUILD_DIR/container
    script:
#      - bash $TRAVIS_BUILD_DIR/scripts/itest.sh
      - docker info
      - cd ${TRAVIS_BUILD_DIR}/container
      - wget "https://cdn.azul.com/zulu/bin/zulu8.33.0.1-jdk8.0.192-linux_x64.tar.gz" -O "docker/blended.docker.base/files/zulu8.33.0.1-jdk8.0.192-linux_x64.tar.gz"
      - docker build -t atooni/blended-base docker/blended.docker.base
      - echo -e "-Ddocker.host=${DOCKER_HOST}\n-Ddocker.port=${DOCKER_PORT}\n" > .sbtopts
      - sbt update blendedItestNode/test
    after_failure:
      - $TRAVIS_BUILD_DIR/scripts/upload-directory.sh $TRAVIS_BUILD_DIR/container/target/testlog blended.itest.node-test.log
    after_success:
      - $TRAVIS_BUILD_DIR/scripts/upload-directory.sh $TRAVIS_BUILD_DIR/container/target/testlog blended.itest.node-test.log

  - stage: IntegrationTest
    name: blendedItestMgmt
    before_script:
      - git clone --branch master --depth 1 https://github.com/woq-blended/blended.container.git $TRAVIS_BUILD_DIR/container
    script:
#      - bash $TRAVIS_BUILD_DIR/scripts/itest.sh
      - docker info
      - wget "https://cdn.azul.com/zulu/bin/zulu8.33.0.1-jdk8.0.192-linux_x64.tar.gz" -O "docker/blended.docker.base/files/zulu8.33.0.1-jdk8.0.192-linux_x64.tar.gz"
      - cd ${TRAVIS_BUILD_DIR}/container
      - docker build -t atooni/blended-base docker/blended.docker.base
      - echo -e "-Ddocker.host=${DOCKER_HOST}\n-Ddocker.port=${DOCKER_PORT}\n" > .sbtopts
      - sbt update blendedItestMgmt/test
    after_failure:
      - $TRAVIS_BUILD_DIR/scripts/upload-directory.sh $TRAVIS_BUILD_DIR/container/target/testlog blended.itest.mgmt-test.log
    after_success:
      - $TRAVIS_BUILD_DIR/scripts/upload-directory.sh $TRAVIS_BUILD_DIR/container/target/testlog blended.itest.mgmt-test.log

    # ------ Stage Site Deploy
  - stage: Site
    before_script:
      - bash $TRAVIS_BUILD_DIR/scripts/download-directory.sh $TRAVIS_BUILD_DIR/target target
    script:
      - sbt jbakeSite
    deploy:
      provider: pages
      local-dir: target/site
      skip-cleanup: true
      github-token: $GITHUB_TOKEN
      keep-history: false
      target-branch: gh-pages
      email: <EMAIL>
      name: <NAME>
      verbose: true
      on:
        branch: master
<commit_msg>travis: Ignore log upload issues<commit_after>language: scala

jdk: oraclejdk8

addons:
  chrome: stable

services:
  - docker

script:
  - sbt ciBuild

cache:
  directories:
    - .prereq-refs
    - "$HOME/.m2"
    - "$HOME/.ivy2"
    - "$HOME/.sbt"

before_install:
  - sudo apt-get update
  - sudo apt-get install graphviz
  - openssl aes-256-cbc -K $encrypted_e8464d595ae2_key -iv $encrypted_e8464d595ae2_iv -in .dropbox_uploader.enc -out $HOME/.dropbox_uploader -d

install:
  - wget -N http://chromedriver.storage.googleapis.com/2.40/chromedriver_linux64.zip -P ~/
  - unzip ~/chromedriver_linux64.zip -d ~/
  - sudo mkdir -p /opt
  - sudo mv -f ~/chromedriver /opt
  - sudo chmod +x /opt/chromedriver
  - sudo ln -s /opt/chromedriver /usr/local/bin/chromedriver

before_cache:
  - rm -Rf $HOME/.ivy2/.sbt.ivy.lock

env:
  global:
    - TEST_ONLINE="true"
    - DOCKER_HOST="unix:///var/run/docker.sock"
    # PGP_PASS
    - secure: "<KEY>
    # SONATYPE_USERNAME
    - secure: "<KEY>
    # SONATYPE_PASSWORD
    - secure: "<KEY>
    # CODACY_PROJECT_TOKEN
    - secure: "<KEY>
    # GITHUB_TOKEN
    - secure: "<KEY>
    # DOCKER_USERNAME
    - secure: "<KEY>
    # DOCKER_PASSWORD
    - secure: "<KEY>

stages:
  - name: VerifyPublish
    if: branch = publish AND type = push

#  - Prerequisites

  - Test

  - name: Deploy
    if: branch = publish AND type = push

  - name: Site
    if: branch = master AND type = push

  - name: BuildITest
    if: branch = master AND type = push

  - name: BuildUI
    if: branch = master AND type = push

#  - name: BuildPlugin
#    if: branch = master AND type = push

  - name: IntegrationTest
    if: branch = master AND type = push

jobs:
  include:
  # ------ Stage Verify publish
  - stage: VerifyPublish
    script: $TRAVIS_BUILD_DIR/scripts/verifyPublish.sh

  # ------ Stage Prerequisites
#  - stage: Prerequisites
#    script:
#      - sh -e scripts/build-prereq.sh sbt-testlogconfig
#      - sh -e scripts/build-prereq.sh sbt-jbake
#      - sh -e scripts/build-prereq.sh sbt-filterresources
#      - sh -e scripts/build-prereq.sh sbt-phoenix
#      - sh -e scripts/build-prereq.sh sbt-blendedbuild

  # ------ Stage Test
  - stage: Test
    before_script:
      - bash $TRAVIS_BUILD_DIR/scripts/checkScripts.sh
      - bash $TRAVIS_BUILD_DIR/scripts/dropbox_uploader.sh list
    #- bash $TRAVIS_BUILD_DIR/scripts/build-akka.sh
    script:
      - sbt clean update publishLocal publishM2 unidoc cleanCoverage
    after_failure:
      - bash $TRAVIS_BUILD_DIR/scripts/upload-results.sh
    after_success:
      - bash $TRAVIS_BUILD_DIR/scripts/upload-results.sh

  # ------ Stage Deploy
  - stage: Deploy
    script:
      - bash $TRAVIS_BUILD_DIR/scripts/runPublish.sh

  # ------ Build the integration test support
  - stage: BuildITest
    script:
      - bash $TRAVIS_BUILD_DIR/scripts/buildITest.sh

  # ------ Build and test the management UI
  - stage: BuildUI
    script:
      - bash $TRAVIS_BUILD_DIR/scripts/buildUI.sh

  # ------ Build Updater Maven Plugin
#  - stage: BuildPlugin
#    script:
#      - bash $TRAVIS_BUILD_DIR/scripts/updaterMavenPlugin.sh

  # ------ Stage Docker Images
  - stage: IntegrationTest
    name: blendedItestNode
    before_script:
      - git clone --branch master --depth 1 https://github.com/woq-blended/blended.container.git $TRAVIS_BUILD_DIR/container
    script:
#      - bash $TRAVIS_BUILD_DIR/scripts/itest.sh
      - docker info
      - cd ${TRAVIS_BUILD_DIR}/container
      - wget "https://cdn.azul.com/zulu/bin/zulu8.33.0.1-jdk8.0.192-linux_x64.tar.gz" -O "docker/blended.docker.base/files/zulu8.33.0.1-jdk8.0.192-linux_x64.tar.gz"
      - docker build -t atooni/blended-base docker/blended.docker.base
      - echo -e "-Ddocker.host=${DOCKER_HOST}\n-Ddocker.port=${DOCKER_PORT}\n" > .sbtopts
      - sbt update blendedItestNode/test
    after_failure:
      - $TRAVIS_BUILD_DIR/scripts/upload-directory.sh $TRAVIS_BUILD_DIR/container/target/testlog blended.itest.node-test.log || true
    after_success:
      - $TRAVIS_BUILD_DIR/scripts/upload-directory.sh $TRAVIS_BUILD_DIR/container/target/testlog blended.itest.node-test.log || true

  - stage: IntegrationTest
    name: blendedItestMgmt
    before_script:
      - git clone --branch master --depth 1 https://github.com/woq-blended/blended.container.git $TRAVIS_BUILD_DIR/container
    script:
#      - bash $TRAVIS_BUILD_DIR/scripts/itest.sh
      - docker info
      - wget "https://cdn.azul.com/zulu/bin/zulu8.33.0.1-jdk8.0.192-linux_x64.tar.gz" -O "docker/blended.docker.base/files/zulu8.33.0.1-jdk8.0.192-linux_x64.tar.gz"
      - cd ${TRAVIS_BUILD_DIR}/container
      - docker build -t atooni/blended-base docker/blended.docker.base
      - echo -e "-Ddocker.host=${DOCKER_HOST}\n-Ddocker.port=${DOCKER_PORT}\n" > .sbtopts
      - sbt update blendedItestMgmt/test
    after_failure:
      - $TRAVIS_BUILD_DIR/scripts/upload-directory.sh $TRAVIS_BUILD_DIR/container/target/testlog blended.itest.mgmt-test.log || true
    after_success:
      - $TRAVIS_BUILD_DIR/scripts/upload-directory.sh $TRAVIS_BUILD_DIR/container/target/testlog blended.itest.mgmt-test.log || true

    # ------ Stage Site Deploy
  - stage: Site
    before_script:
      - bash $TRAVIS_BUILD_DIR/scripts/download-directory.sh $TRAVIS_BUILD_DIR/target target
    script:
      - sbt jbakeSite
    deploy:
      provider: pages
      local-dir: target/site
      skip-cleanup: true
      github-token: $GITHUB_TOKEN
      keep-history: false
      target-branch: gh-pages
      email: <EMAIL>
      name: <NAME>
      verbose: true
      on:
        branch: master

{'fraction_non_alphanumeric': 0.12362169430748543, 'fraction_numerical': 0.014522635589421785, 'mean_word_length': 2.5998709261051953, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 25, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 8, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '283593', 'n_tokens_mistral': 4312, 'n_tokens_neox': 4060, 'n_words': 756}