Improve shell scripts style
Change-Id: I5a4b800262c6afff78cd021cae6f6f5bb596c49c
This commit is contained in:
parent
086528ca0b
commit
abd2ef8c84
@ -29,11 +29,11 @@ wget http://archive.cloudera.com/cm5/ubuntu/precise/amd64/cm/cloudera.list -O cm
|
||||
sed -i "s/http:\/\//http:\/\/${CACHE_IP}\:3142\//g" cdh.list cm.list
|
||||
|
||||
sudo apt-get install apache2 -y
|
||||
sudo echo -e "Alias /cdh-repo ${REPOLIST_DIR}
|
||||
echo -e "Alias /cdh-repo ${REPOLIST_DIR}
|
||||
<Directory ${REPOLIST_DIR}>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
Options +Indexes
|
||||
</Directory>" > /etc/apache2/sites-available/repo.conf
|
||||
</Directory>" | sudo tee /etc/apache2/sites-available/repo.conf
|
||||
sudo a2ensite repo
|
||||
sudo service apache2 reload
|
||||
|
@ -14,7 +14,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ `nova endpoints | grep neutron` != "" ]]; then
|
||||
if [[ $(nova endpoints | grep neutron) != "" ]]; then
|
||||
USE_NEUTRON=true
|
||||
else
|
||||
USE_NEUTRON=false
|
||||
|
@ -112,7 +112,7 @@ echo ceph osd tree
|
||||
sleep 5
|
||||
sudo cp $DIR/ceph.conf /etc/ceph/
|
||||
|
||||
CEPH_HEALTH=`ceph health`
|
||||
CEPH_HEALTH=$(ceph health)
|
||||
if [ "$CEPH_HEALTH" == "HEALTH_OK" ]; then
|
||||
echo "Ceph is installed successfully and working OK."
|
||||
echo
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
#Repository for Openstack Dashboard
|
||||
#sudo add-apt-repository cloud-archive:havana -y
|
||||
NETWORK=`ifconfig eth0 | awk -F ' *|:' '/inet addr/{print $4}' | awk -F . '{print $2}'`
|
||||
NETWORK=$(ifconfig eth0 | awk -F ' *|:' '/inet addr/{print $4}' | awk -F . '{print $2}')
|
||||
if [ "$NETWORK" == "0" ]; then
|
||||
OPENSTACK_HOST="172.18.168.42"
|
||||
else
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
builders:
|
||||
- gerrit-git-prep
|
||||
- shell: "bash -x /opt/ci/jenkins-jobs/sahara-ci-syntax-check.sh"
|
||||
- shell: "bash /opt/ci/jenkins-jobs/sahara-ci-syntax-check.sh"
|
||||
|
||||
publishers:
|
||||
- console-log
|
||||
|
@ -4,11 +4,11 @@ TMP_LOG=/tmp/tox.log
|
||||
LOG_FILE=/tmp/tox_log.txt
|
||||
BUILD_ID=dontKill
|
||||
TIMEOUT=60
|
||||
export ADDR=`ifconfig eth0| awk -F ' *|:' '/inet addr/{print $4}'`
|
||||
export ADDR=$(ifconfig eth0| awk -F ' *|:' '/inet addr/{print $4}')
|
||||
|
||||
# This function determines Openstack host by checking internal address (second octet)
|
||||
check_openstack_host() {
|
||||
NETWORK=`ifconfig eth0 | awk -F ' *|:' '/inet addr/{print $4}' | awk -F . '{print $2}'`
|
||||
NETWORK=$(ifconfig eth0 | awk -F ' *|:' '/inet addr/{print $4}' | awk -F . '{print $2}')
|
||||
export OS_USERNAME=ci-user
|
||||
export OS_TENANT_NAME=ci
|
||||
export OS_PASSWORD=nova
|
||||
@ -106,7 +106,7 @@ start_sahara() {
|
||||
sahara_bin=sahara-all
|
||||
fi
|
||||
sahara-db-manage --config-file $conf_path upgrade head
|
||||
status=`echo $?`
|
||||
status=$?
|
||||
if [[ "$status" != 0 ]]
|
||||
then
|
||||
echo "Command 'sahara-db-manage' failed"
|
||||
@ -147,9 +147,8 @@ NEUTRON_ENABLED = $USE_NEUTRON
|
||||
INTERNAL_NEUTRON_NETWORK = 'private'
|
||||
JOB_LAUNCH_TIMEOUT = 15
|
||||
HDFS_INITIALIZATION_TIMEOUT = 10
|
||||
" >> $test_conf_path
|
||||
|
||||
echo "[VANILLA]
|
||||
[VANILLA]
|
||||
IMAGE_NAME = '$VANILLA_IMAGE'
|
||||
SKIP_ALL_TESTS_FOR_PLUGIN = $SKIP_ALL_TESTS_FOR_PLUGIN
|
||||
SKIP_CINDER_TEST = '$SKIP_CINDER_TEST'
|
||||
@ -160,9 +159,8 @@ SKIP_SWIFT_TEST = $SKIP_SWIFT_TEST
|
||||
SKIP_SCALING_TEST = $SKIP_SCALING_TEST
|
||||
SKIP_TRANSIENT_CLUSTER_TEST = $SKIP_TRANSIENT_TEST
|
||||
ONLY_TRANSIENT_CLUSTER_TEST = $SKIP_ONLY_TRANSIENT_TEST
|
||||
" >> $test_conf_path
|
||||
|
||||
echo "[VANILLA_TWO]
|
||||
[VANILLA_TWO]
|
||||
IMAGE_NAME = '$VANILLA_TWO_IMAGE'
|
||||
SKIP_ALL_TESTS_FOR_PLUGIN = $SKIP_ALL_TESTS_FOR_PLUGIN
|
||||
SKIP_CINDER_TEST = '$SKIP_CINDER_TEST'
|
||||
@ -201,17 +199,15 @@ SKIP_EDP_TEST = $SKIP_EDP_TEST
|
||||
SKIP_MAP_REDUCE_TEST = $SKIP_MAP_REDUCE_TEST
|
||||
SKIP_SWIFT_TEST = $SKIP_SWIFT_TEST
|
||||
SKIP_SCALING_TEST = $SKIP_SCALING_TEST
|
||||
" >> $test_conf_path
|
||||
|
||||
echo "[HDP2]
|
||||
[HDP2]
|
||||
IMAGE_NAME = '$HDP_TWO_IMAGE'
|
||||
SKIP_ALL_TESTS_FOR_PLUGIN = $SKIP_ALL_TESTS_FOR_PLUGIN
|
||||
SKIP_SCALING_TEST = $SKIP_SCALING_TEST
|
||||
SKIP_EDP_TEST = $SKIP_EDP_TEST
|
||||
SKIP_SWIFT_TEST = $SKIP_SWIFT_TEST
|
||||
" >> $test_conf_path
|
||||
|
||||
echo "[CDH]
|
||||
[CDH]
|
||||
IMAGE_NAME = '$CDH_IMAGE'
|
||||
SKIP_ALL_TESTS_FOR_PLUGIN = $SKIP_ALL_TESTS_FOR_PLUGIN
|
||||
SKIP_MAP_REDUCE_TEST = $SKIP_MAP_REDUCE_TEST
|
||||
@ -221,9 +217,8 @@ SKIP_CINDER_TEST = $SKIP_CINDER_TEST
|
||||
SKIP_EDP_TEST = $SKIP_EDP_TEST
|
||||
CM_REPO_LIST_URL = 'http://$OPENSTACK_HOST/cdh-repo/cm.list'
|
||||
CDH_REPO_LIST_URL = 'http://$OPENSTACK_HOST/cdh-repo/cdh.list'
|
||||
" >> $test_conf_path
|
||||
|
||||
echo "[SPARK]
|
||||
[SPARK]
|
||||
IMAGE_NAME = '$SPARK_IMAGE'
|
||||
SKIP_ALL_TESTS_FOR_PLUGIN = $SKIP_ALL_TESTS_FOR_PLUGIN
|
||||
SKIP_EDP_TEST = $SKIP_EDP_TEST
|
||||
@ -240,35 +235,35 @@ run_tests() {
|
||||
if [ "$ZUUL_BRANCH" == "stable/icehouse" ]
|
||||
then
|
||||
tox -e integration -- hdp --concurrency=1
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
else
|
||||
tox -e integration -- hdp1 --concurrency=1
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
fi
|
||||
;;
|
||||
hdp2)
|
||||
tox -e integration -- hdp2 --concurrency=1
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
;;
|
||||
vanilla1)
|
||||
tox -e integration -- vanilla1 --concurrency=1
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
;;
|
||||
vanilla2)
|
||||
tox -e integration -- vanilla2 --concurrency=1
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
;;
|
||||
transient)
|
||||
tox -e integration -- transient --concurrency=3
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
;;
|
||||
cdh)
|
||||
tox -e integration -- cdh --concurrency=1
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
;;
|
||||
spark)
|
||||
tox -e integration -- spark --concurrency=1
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -6,7 +6,8 @@ set -o pipefail
|
||||
|
||||
# replace hacking with master tarball
|
||||
sed -i '/^hacking/d' test-requirements.txt
|
||||
echo -e "-f http://tarballs.openstack.org/hacking/hacking-master.tar.gz#egg=hacking-master\nhacking==master\n$(cat test-requirements.txt)" > test-requirements.txt
|
||||
REQS=$(cat test-requirements.txt)
|
||||
echo -e "-f http://tarballs.openstack.org/hacking/hacking-master.tar.gz#egg=hacking-master\nhacking==master\n${REQS}" > test-requirements.txt
|
||||
|
||||
sed -i '/^ignore/d' tox.ini
|
||||
sed -ie 's/\(^exclude.*\)/\1,*sahara-ci-config*/' tox.ini
|
||||
|
@ -63,7 +63,7 @@ hadoop_version = '1.3.2'
|
||||
" >> $DASHBOARD_PATH/saharadashboard/tests/configs/config.conf
|
||||
|
||||
cd $DASHBOARD_PATH && tox -e uitests
|
||||
STATUS=`echo $?`
|
||||
STATUS=$?
|
||||
|
||||
glance image-delete $TEST_IMAGE
|
||||
exit $STATUS
|
||||
|
@ -18,7 +18,7 @@ else
|
||||
fi
|
||||
if [ $JOB_TYPE == 'dib' ]; then
|
||||
PLUGIN=$(echo $PREV_JOB | awk -F '-' '{ print $4 }')
|
||||
if [[ $PLUGIN =~ 'vanilla' ]]; then
|
||||
if [[ $PLUGIN =~ vanilla ]]; then
|
||||
IMAGE_TYPE=$(echo $PREV_JOB | awk -F '-' '{ print $5 }')
|
||||
if [ "$IMAGE_TYPE" == "centos" ]; then
|
||||
os="cos"
|
||||
@ -39,7 +39,7 @@ if [ $JOB_TYPE == 'dib' ]; then
|
||||
python cleanup.py cleanup .*$HOST-cos-1-$PREV_BUILD-hdp.*
|
||||
elif [ $PLUGIN == 'hdp_2' ]; then
|
||||
python cleanup.py cleanup-heat .*$HOST-cos-2-$PREV_BUILD-hdp-v2.*
|
||||
elif [[ $PLUGIN =~ 'cdh' ]]; then
|
||||
elif [[ $PLUGIN =~ cdh ]]; then
|
||||
IMAGE_TYPE=$(echo $PREV_JOB | awk -F '-' '{ print $5 }')
|
||||
if [ "$IMAGE_TYPE" == "centos" ]; then
|
||||
os="cos"
|
||||
@ -58,7 +58,7 @@ else
|
||||
ENGINE=$(echo $PREV_JOB | awk -F '-' '{ print $4 }')
|
||||
JOB_TYPE=$(echo $PREV_JOB | awk -F '-' '{ print $5 }')
|
||||
HADOOP_VERSION=1
|
||||
if [[ $JOB_TYPE =~ 'vanilla' ]]
|
||||
if [[ $JOB_TYPE =~ vanilla ]]
|
||||
then
|
||||
HADOOP_VERSION=$(echo $JOB_TYPE | awk -F '_' '{ print $2 }')
|
||||
if [ "$HADOOP_VERSION" == '1' ]; then
|
||||
@ -80,7 +80,7 @@ else
|
||||
HADOOP_VERSION=2
|
||||
JOB_TYPE=hdp-v2
|
||||
fi
|
||||
if [[ $JOB_TYPE =~ 'cdh' ]]
|
||||
if [[ $JOB_TYPE =~ cdh ]]
|
||||
then
|
||||
os_version=$(echo $JOB_TYPE | awk -F '_' '{ print $2}')
|
||||
if [ "$os_version" == "centos" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user