<commit_before>#!/usr/bin/env bash

set -e

echo "build started"
export BUILD_BRANCH=${GIT_REFERENCE}
export VAGRANT_BASEDIR="`pwd`/build/continuous-build" # contains provision script and synced folder
export VAGRANT_WORKDIR="${VAGRANT_BASEDIR}/aws" # contains the Vagrantfile itself
export REPORTS_BASEDIR="`pwd`"

echoerr() { echo "$@" 1>&2; }

echo "user is $USER";

echo "installing node"
nvm install 0.10.35 # keep this in older version deliberately.

# replace json file placeholders with environment variables. https://github.com/guy-mograbi-at-gigaspaces/node-replace-env-in-json-file
curl -L https://goo.gl/j6qnth | INJECT_FILE="${CONFIG_FILE}" node

## add inline editing for config.json

`which json` || npm install -g json
json -I -f ${CONFIG_FILE} -e "this.environmentVariables.TEST_TYPE=\"${TEST_TYPE}\"" # TEST_TYPE = protract:sanity, applitools
json -I -f ${CONFIG_FILE} -e "this.environmentVariables.CLOUDIFY_INSTALLER_TAG=\"${CLOUDIFY_INSTALL_TAG}\""
json -I -f ${CONFIG_FILE} -e "this.environmentVariables.CLOUDIFY_INSTALLER_TYPE=\"${CLOUDIFY_INSTALLER_TYPE}\"" # ssl, security, plain
json -I -f ${CONFIG_FILE} -e "this.environmentVariables.BROWSER_TYPE=\"${BROWSER_TYPE}\"" # phantomjs, firefox, chrome

if [ "${USE_UNSTABLE_UI}" = "true" ];then
    echo "using unstable ui url"
    npm install -g guy-mograbi-at-gigaspaces/cloudify-ui-build-helper
    source get-artifacts-files
    CLOUDIFY_INTALLER_INPUT_WEBUI_SOURCE_URL="https://s3.amazonaws.com/cloudify-ui`PROJECT_NAME=cloudify-ui get-unstable-s3-folder`/${CLOUDIFY_UI_TAR_GZ}'"
    json -I -f ${CONFIG_FILE} -e "this.environmentVariables.CLOUDIFY_INTALLER_INPUT_WEBUI_SOURCE_URL=\"${CLOUDIFY_INTALLER_INPUT_WEBUI_SOURCE_URL}\"" #
fi
<commit_msg>fix reference to unstable s3-folder<commit_after>#!/usr/bin/env bash

set -e

echo "build started"
export BUILD_BRANCH=${GIT_REFERENCE}
export VAGRANT_BASEDIR="`pwd`/build/continuous-build" # contains provision script and synced folder
export VAGRANT_WORKDIR="${VAGRANT_BASEDIR}/aws" # contains the Vagrantfile itself
export REPORTS_BASEDIR="`pwd`"

echoerr() { echo "$@" 1>&2; }

echo "user is $USER";

echo "installing node"
nvm install 0.10.35 # keep this in older version deliberately.

# replace json file placeholders with environment variables. https://github.com/guy-mograbi-at-gigaspaces/node-replace-env-in-json-file
curl -L https://goo.gl/j6qnth | INJECT_FILE="${CONFIG_FILE}" node

## add inline editing for config.json

`which json` || npm install -g json
json -I -f ${CONFIG_FILE} -e "this.environmentVariables.TEST_TYPE=\"${TEST_TYPE}\"" # TEST_TYPE = protract:sanity, applitools
json -I -f ${CONFIG_FILE} -e "this.environmentVariables.CLOUDIFY_INSTALLER_TAG=\"${CLOUDIFY_INSTALL_TAG}\""
json -I -f ${CONFIG_FILE} -e "this.environmentVariables.CLOUDIFY_INSTALLER_TYPE=\"${CLOUDIFY_INSTALLER_TYPE}\"" # ssl, security, plain
json -I -f ${CONFIG_FILE} -e "this.environmentVariables.BROWSER_TYPE=\"${BROWSER_TYPE}\"" # phantomjs, firefox, chrome

if [ "${USE_UNSTABLE_UI}" = "true" ];then
    echo "using unstable ui url"
    npm install -g guy-mograbi-at-gigaspaces/cloudify-ui-build-helper
    source get-artifacts-files
    CLOUDIFY_INTALLER_INPUT_WEBUI_SOURCE_URL="https://s3.amazonaws.com/cloudify-ui/`PROJECT_NAME=cloudify-ui get-unstable-s3-folder`/${CLOUDIFY_UI_TAR_GZ}'"
    json -I -f ${CONFIG_FILE} -e "this.environmentVariables.CLOUDIFY_INTALLER_INPUT_WEBUI_SOURCE_URL=\"${CLOUDIFY_INTALLER_INPUT_WEBUI_SOURCE_URL}\"" #
fi

{'fraction_non_alphanumeric': 0.1395214759296627, 'fraction_numerical': 0.006053617757278754, 'mean_word_length': 5.609523809523809, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 6, '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': '2208578', 'n_tokens_mistral': 1322, 'n_tokens_neox': 1258, 'n_words': 254}