<commit_before>#!/usr/bin/env bash
set -e

source `dirname $0`/shared.inc

changed=`cat $ROOT_DIR/changed_cookbooks`

pantry_branch "testing"

for homebase in $HOMEBASES; do
  cd $WORKSPACE/$homebase
  # Install testing cookbooks, upload and freeze those which changed this run
  bundle exec berks install --path cookbooks
  knife cookbook upload -V --freeze $changed

  # Record the cookbook versions to the staging evnironment
  git checkout staging
  VERSIONS=environments/cookbook_versions.rb
  cat $ROOT_DIR/cookbook_versions.rb.h > $VERSIONS
  for target in `ls -1d cookbooks/*`; do
    cookbook=${target#cookbooks/}
    version=`cat cookbooks/$cookbook/VERSION`
    echo -e "\$versions['$cookbook']\t= '$version'" >> $VERSIONS
  done
  knife environment from file staging.rb
  git commit $VERSIONS -m"$VERSIONS: updating staged versions"
<commit_msg>jenkins_integration: fixing small name bug<commit_after>#!/usr/bin/env bash
set -e

source `dirname $0`/shared.inc

changed=`cat $ROOT_DIR/changed_cookbooks`

pantry_branch "testing"

for homebase in $HOMEBASES; do
  cd $WORKSPACE/$homebase
  # Install testing cookbooks, upload and freeze those which changed this run
  bundle exec berks install --path cookbooks
  knife cookbook upload -V --freeze $changed

  # Record the cookbook versions to the staging evnironment
  git checkout staging
  VERSIONS=environments/cookbook_versions.rb
  cat $ROOT_DIR/cookbook_versions.rb.h > $VERSIONS
  for target in `ls -1d cookbooks/*`; do
    cookbook=${target#cookbooks/}
    version=`cat cookbooks/$cookbook/VERSION`
    echo -e "\$cookbooks['$cookbook']\t= '$version'" >> $VERSIONS
  done
  knife environment from file staging.rb
  git commit $VERSIONS -m"$VERSIONS: updating staged versions"

{'fraction_non_alphanumeric': 0.1003440366972477, 'fraction_numerical': 0.0022935779816513763, 'mean_word_length': 4.470219435736677, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '677855', 'n_tokens_mistral': 561, 'n_tokens_neox': 545, 'n_words': 172}