<commit_before>set -ex
WORKSPACE=${WORKSPACE:-/tmp}
ANSIBLE_HOSTS=${ANSIBLE_HOSTS:-$WORKSPACE/hosts}
LOGSERVER="logs.rdoproject.org ansible_user=uploader"
SOURCE="${WORKSPACE}/workspace/logs"
DESTINATION="/var/www/html/ci.centos.org/${JOB_NAME}/${BUILD_NUMBER}"
VENV="${WORKSPACE}/venv"

[[ ! -d "${VENV}" ]] && virtualenv "${VENV}"
source "${VENV}/bin/activate"

# Ensure that ansible is installed.
pip install ansible==2.5.8

# Add logserver to the ansible_hosts file
cat << EOF >> ${ANSIBLE_HOSTS}
[logserver]
${LOGSERVER}
EOF

pushd $WORKSPACE
mkdir -p $WORKSPACE/logs

cat << EOF > collect-logs.yaml
# Create a playbook to pull the logs down from our cico node
- name: Group together logs on cico node
  hosts: openstack_nodes
  gather_facts: no
  tasks:
   - shell: |
        mkdir -p ${WORKSPACE}/workspace/logs

        pushd ${WORKSPACE}/workspace
            cp *.log ./logs/
            cp *.conf ./logs/
        popd

- name: Collect logs from cico node
  hosts: openstack_nodes
  gather_facts: no
  tasks:
    - synchronize:
          mode: pull
          src: "${SOURCE}"<commit_msg>Update tripleo-upstream-collect-logs to grab tripleo-ci logs<commit_after>set -ex
CICO_USER_DIR=${CICO_USER_DIR:-/root}
WORKSPACE=${WORKSPACE:-/tmp}
ANSIBLE_HOSTS=${ANSIBLE_HOSTS:-$WORKSPACE/hosts}
LOGSERVER="logs.rdoproject.org ansible_user=uploader"
SOURCE="${CICO_USER_DIR}/workspace/logs"
DESTINATION="/var/www/html/ci.centos.org/${JOB_NAME}/${BUILD_NUMBER}"
VENV="${WORKSPACE}/venv"

[[ ! -d "${VENV}" ]] && virtualenv "${VENV}"
source "${VENV}/bin/activate"

# Ensure that ansible is installed.
pip install ansible==2.5.8

# Add logserver to the ansible_hosts file
cat << EOF >> ${ANSIBLE_HOSTS}
[logserver]
${LOGSERVER}
EOF

pushd $WORKSPACE
mkdir -p $WORKSPACE/logs

cat << EOF > collect-logs.yaml
# Create a playbook to pull the logs down from our cico node
- name: Group together logs on cico node
  hosts: openstack_nodes
  gather_facts: no
  tasks:
   - shell: |
        mkdir -p ${CICO_USER_DIR}/workspace/logs

        pushd ${CICO_USER_DIR}/workspace
            cp *.log ./logs/
            cp *.conf ./logs/
        popd

- name: Collect logs from cico node
  hosts: openstack_nodes
  gather_facts: no
  tasks:
    - synchronize:
          mode: pull
          src: "${SOURCE}"
{'fraction_non_alphanumeric': 0.13836752509821038, 'fraction_numerical': 0.0026189436927106066, 'mean_word_length': 3.4853228962818004, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3866836', 'n_tokens_mistral': 822, 'n_tokens_neox': 813, 'n_words': 197}