<commit_before>---
  chain:
    -
      name: "get_current_build"
      ref: "st2cd.kvstore"
      params:
        key: "st2_{{branch}}_build_number"
        action: "get"
      on-success: "get_build_server"
    -
      name: "get_build_server"
      ref: "linux.dig"
      params:
        hostname: "st2-build-slave-ubuntu.service.consul"
        rand: true
        count: 1
      publish:
        build_server: "{{get_build_server.result[0]}}"
      on-success: "clean_build_env"
    -
      name: "clean_build_env"
      ref: "core.remote"
      params:
        hosts: "{{build_server}}"
        cmd: "rm -Rf /tmp/st2*"
      on-success: "clone_repo"
    - 
      name: "clone_repo"
      ref: "st2cd.git_clone"
      params: 
        hosts: "{{build_server}}"
        repo: "{{repo}}"
        target: "{{repo_target}}"
        branch: "{{branch}}"
      publish:
        repodir: "{{repodir}}"
      on-success: "version"
    -
      name: "version"
      ref: "st2cd.st2_version"
      params:
        hosts: "{{build_server}}"
        repo: "{{repodir}}"
      publish:
        version: "{{version[build_server].stdout}}"
      on-success: "version_hack"
    - 
      name: "version_hack"
      ref: "st2cd.version_hack"
      params: 
        hosts: "{{build_server}}"
        repo: "{{repodir}}"
        build: "{{get_current_build.result}}"
      on-success: "make_docs"
    -
      name: "update_url"
      ref: "core.remote"
      params:
        hosts: "{{build_server}}"
        cmd: "{% if environment == 'production' %}echo 'Production URL is correct in code' {% else %}sed -e 's~docs\.stackstorm\.com~{{docs_url}}~g' docs/source/conf.py {% endif %}"
    - 
      name: "make_docs"
      ref: "st2cd.make_docs"
      params: 
        hosts: "{{build_server}}"
        repo: "{{repodir}}"
        timeout: 180
      on-success: "s3cmd_docs"
    - 
      name: "s3cmd_docs"
      ref: "st2cd.s3_docs"
      params: 
        hosts: "{{build_server}}"<commit_msg>Added on success param and fixed flow<commit_after>---
  chain:
    -
      name: "get_current_build"
      ref: "st2cd.kvstore"
      params:
        key: "st2_{{branch}}_build_number"
        action: "get"
      on-success: "get_build_server"
    -
      name: "get_build_server"
      ref: "linux.dig"
      params:
        hostname: "st2-build-slave-ubuntu.service.consul"
        rand: true
        count: 1
      publish:
        build_server: "{{get_build_server.result[0]}}"
      on-success: "clean_build_env"
    -
      name: "clean_build_env"
      ref: "core.remote"
      params:
        hosts: "{{build_server}}"
        cmd: "rm -Rf /tmp/st2*"
      on-success: "clone_repo"
    - 
      name: "clone_repo"
      ref: "st2cd.git_clone"
      params: 
        hosts: "{{build_server}}"
        repo: "{{repo}}"
        target: "{{repo_target}}"
        branch: "{{branch}}"
      publish:
        repodir: "{{repodir}}"
      on-success: "version"
    -
      name: "version"
      ref: "st2cd.st2_version"
      params:
        hosts: "{{build_server}}"
        repo: "{{repodir}}"
      publish:
        version: "{{version[build_server].stdout}}"
      on-success: "version_hack"
    - 
      name: "version_hack"
      ref: "st2cd.version_hack"
      params: 
        hosts: "{{build_server}}"
        repo: "{{repodir}}"
        build: "{{get_current_build.result}}"
      on-success: "update_url"
    -
      name: "update_url"
      ref: "core.remote"
      params:
        hosts: "{{build_server}}"
        cmd: "{% if environment == 'production' %}echo 'Production URL is correct in code' {% else %}sed -e 's~docs\.stackstorm\.com~{{docs_url}}~g' docs/source/conf.py {% endif %}"
      on-success: "make_docs"
    - 
      name: "make_docs"
      ref: "st2cd.make_docs"
      params: 
        hosts: "{{build_server}}"
        repo: "{{repodir}}"
        timeout: 180
      on-success: "s3cmd_docs"
    - 
      name: "s3cmd_docs"
      ref: "st2cd.s3_docs"
      params: 
        hosts: "{{build_server}}"
{'fraction_non_alphanumeric': 0.15630461922596753, 'fraction_numerical': 0.008988764044943821, 'mean_word_length': 2.002998500749625, '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': '753886', 'n_tokens_mistral': 1456, 'n_tokens_neox': 1407, 'n_words': 269}