<commit_before>#!/bin/bash

<% if_p('env.http_proxy') do |http_proxy| %>
export HTTP_PROXY=<%= http_proxy %>
export http_proxy=<%= http_proxy %>
<% end %>

<% if_p('env.https_proxy') do |https_proxy| %>
export HTTPS_PROXY=<%= https_proxy %>
export https_proxy=<%= https_proxy %>
<% end %>

<% if_p('env.no_proxy') do |no_proxy| %>
export NO_PROXY=<%= no_proxy %>
export no_proxy=<%= no_proxy %>
<% end %>

BOSH_PACKAGES_DIR=${BOSH_PACKAGES_DIR:-/var/vcap/packages}
BOSH_JOBS_DIR=${BOSH_JOBS_DIR:-/var/vcap/jobs}

PATH=$BOSH_PACKAGES_DIR/ruby_openstack_cpi/bin:$PATH
export PATH

export BUNDLE_GEMFILE=$BOSH_PACKAGES_DIR/bosh_openstack_cpi/Gemfile

bundle_cmd="$BOSH_PACKAGES_DIR/ruby_openstack_cpi/bin/bundle"

exec $bundle_cmd exec $BOSH_PACKAGES_DIR/bosh_openstack_cpi/bin/openstack_cpi \
  $BOSH_JOBS_DIR/openstack_cpi/config/cpi.json \
  $BOSH_JOBS_DIR/openstack_cpi/config/cacert.pem
<commit_msg>Quote proxy environment variables in CPI job<commit_after>#!/bin/bash

<% if_p('env.http_proxy') do |http_proxy| %>
export HTTP_PROXY="<%= http_proxy %>"
export http_proxy="<%= http_proxy %>"
<% end %>

<% if_p('env.https_proxy') do |https_proxy| %>
export HTTPS_PROXY="<%= https_proxy %>"
export https_proxy="<%= https_proxy %>"
<% end %>

<% if_p('env.no_proxy') do |no_proxy| %>
export NO_PROXY="<%= no_proxy %>"
export no_proxy="<%= no_proxy %>"
<% end %>

BOSH_PACKAGES_DIR=${BOSH_PACKAGES_DIR:-/var/vcap/packages}
BOSH_JOBS_DIR=${BOSH_JOBS_DIR:-/var/vcap/jobs}

PATH=$BOSH_PACKAGES_DIR/ruby_openstack_cpi/bin:$PATH
export PATH

export BUNDLE_GEMFILE=$BOSH_PACKAGES_DIR/bosh_openstack_cpi/Gemfile

bundle_cmd="$BOSH_PACKAGES_DIR/ruby_openstack_cpi/bin/bundle"

exec $bundle_cmd exec $BOSH_PACKAGES_DIR/bosh_openstack_cpi/bin/openstack_cpi \
  $BOSH_JOBS_DIR/openstack_cpi/config/cpi.json \
  $BOSH_JOBS_DIR/openstack_cpi/config/cacert.pem

{'fraction_non_alphanumeric': 0.15826558265582655, 'fraction_numerical': 0.0, 'mean_word_length': 7.13215859030837, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '3206612', 'n_tokens_mistral': 869, 'n_tokens_neox': 799, 'n_words': 96}