Files
sahara-ci-config/slave-scripts/gate-sahara.sh
Denis Egorenko 0a5838fa09 Rename all plugins to full plugin version
Rename short plugin names to full plugin names and add
OS version to job name.

Also sort by alphabetical functions-* files.

Change-Id: I5155613715fd2ced99034807f14f495487d2d8ac
2015-06-22 20:41:30 +03:00

59 lines
1.8 KiB
Bash
Executable File

#!/bin/bash -xe
# source CI credentials
. /home/jenkins/ci_openrc
# source main functions
. $FUNCTION_PATH/functions-common.sh
CLUSTER_HASH=${CLUSTER_HASH:-$RANDOM}
cluster_name="$HOST-$ZUUL_CHANGE-$CLUSTER_HASH"
SAHARA_PATH=${1:-$WORKSPACE}
sahara_conf_file=$SAHARA_PATH/etc/sahara/sahara.conf
sahara_templates_path=$SAHARA_PATH/etc/scenario/sahara-ci
engine_type=$(echo $JOB_NAME | awk -F '-' '{ print $4 }')
plugin=$(echo $JOB_NAME | awk -F '-' '{ print $5 }')
os=$(echo $JOB_NAME | awk -F '-' '{ print $6 }')
image_name=${plugin}_${os}
mode="aio"
sahara_plugin=$(echo $plugin | awk -F '_' '{ print $1 } ')
case $plugin in
hdp_2.0.6)
mode=distribute
scenario_conf_file="$sahara_templates_path/hdp-2.0.6.yaml"
;;
vanilla_2.6.0)
mode=distribute
scenario_conf_file="$sahara_templates_path/vanilla-2.6.0.yaml"
;;
transient)
# transient is using image with latest vanilla version
image_name=vanilla_2.6.0_u14
concurrency=3
mode=distribute
scenario_conf_file="$sahara_templates_path/transient.yaml"
;;
cdh_5.3.0)
scenario_conf_file="$sahara_templates_path/cdh-5.3.0.yaml"
;;
cdh_5.4.0)
scenario_conf_file="$sahara_templates_path/cdh-5.4.0.yaml"
;;
spark_1.0.0)
scenario_conf_file="$sahara_templates_path/spark-1.0.0.yaml"
;;
mapr_4.0.2.mrv2)
mode=distribute
scenario_conf_file="$sahara_templates_path/mapr-4.0.2.mrv2.yaml"
;;
esac
sudo pip install . --no-cache-dir
enable_pypi
write_sahara_main_conf "$sahara_conf_file" "$engine_type" "$sahara_plugin"
write_tests_conf "$scenario_conf_file" "$cluster_name" "$image_name"
start_sahara "$sahara_conf_file" "$mode" && run_tests "$scenario_conf_file" "$concurrency"
print_python_env