Clean up formatting to pass linters job and make it voting

Change-Id: I6e160137be0421880d5fb60b32098ecccc34c193
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
Dean Troyer 2018-06-28 17:28:18 -05:00
parent 03ace86932
commit 2042bf7394
6 changed files with 48 additions and 44 deletions

View File

@ -2,9 +2,7 @@
- project: - project:
check: check:
jobs: jobs:
- openstack-tox-linters: - openstack-tox-linters
voting: false
gate: gate:
jobs: jobs:
- openstack-tox-linters: - openstack-tox-linters
voting: false

View File

@ -6,10 +6,14 @@ if [ $# -lt 3 ]; then
echo "$0 <rpms_list> <match_level> <from_where>" echo "$0 <rpms_list> <match_level> <from_where>"
echo "rpm_list: a list of RPM files to be downloaded." echo "rpm_list: a list of RPM files to be downloaded."
echo "match_level: value could be L1, L2 or L3:" echo "match_level: value could be L1, L2 or L3:"
echo " L1: use name, major version and minor version, for example, using vim-7.4.160-2.el7 to search vim-7.4.160-2.el7.src.rpm" echo " L1: use name, major version and minor version:"
echo " L2: use name and major version, for example, using vim-7.4.160 to search vim-7.4.160-2.el7.src.rpm" echo " vim-7.4.160-2.el7 to search vim-7.4.160-2.el7.src.rpm"
echo " L3: use name, for example, using vim to search vim-7.4.160-2.el7.src.rpm" echo " L2: use name and major version:"
echo "from_where: where to download the RPMs: 'centos'from CentOS Repos, otherwise from 3rd-party websets" echo " using vim-7.4.160 to search vim-7.4.160-2.el7.src.rpm"
echo " L3: use name:"
echo " using vim to search vim-7.4.160-2.el7.src.rpm"
echo "from_where: where to download the RPMs: 'centos'from CentOS Repos,"
echo "otherwise from 3rd-party websets"
exit -1 exit -1
fi fi
@ -85,38 +89,38 @@ download () {
download_cmd="wget $rpm_url" download_cmd="wget $rpm_url"
SFILE=$rpm_name SFILE=$rpm_name
fi fi
echo "--> run: $download_cmd" echo "--> run: $download_cmd"
if [ "$_type" == "src" ]; then if [ "$_type" == "src" ]; then
if [ ! -e $MDIR_SRC/$rpm_name ]; then if [ ! -e $MDIR_SRC/$rpm_name ]; then
echo "Looking for $rpm_name" echo "Looking for $rpm_name"
if $download_cmd ; then if $download_cmd ; then
if ! mv -f $SFILE* $MDIR_SRC ; then if ! mv -f $SFILE* $MDIR_SRC ; then
echo "FAILED to move $rpm_name" echo "FAILED to move $rpm_name"
echo $rpm_name >> $FAIL_MOVE_SRPMS echo $rpm_name >> $FAIL_MOVE_SRPMS
fi fi
echo $rpm_name >> $FOUND_SRPMS echo $rpm_name >> $FOUND_SRPMS
else else
echo $rpm_name >> $MISSING_SRPMS echo $rpm_name >> $MISSING_SRPMS
fi fi
else else
echo "Already have ${MDIR_BIN}/${_type}/$rpm_name" echo "Already have ${MDIR_BIN}/${_type}/$rpm_name"
echo $rpm_name >> $FOUND_SRPMS echo $rpm_name >> $FOUND_SRPMS
fi fi
else ## noarch or x86_64 else ## noarch or x86_64
if [ ! -e ${MDIR_BIN}/${_type}/$rpm_name ]; then if [ ! -e ${MDIR_BIN}/${_type}/$rpm_name ]; then
echo "Looking for $rpm_name..." echo "Looking for $rpm_name..."
if $download_cmd ; then if $download_cmd ; then
mkdir -p $MDIR_BIN/${_type} mkdir -p $MDIR_BIN/${_type}
if ! mv -f $SFILE* $MDIR_BIN/${_type}/ ; then if ! mv -f $SFILE* $MDIR_BIN/${_type}/ ; then
echo "FAILED to move $rpm_name" echo "FAILED to move $rpm_name"
echo $rpm_name >> $FAIL_MOVE_RPMS echo $rpm_name >> $FAIL_MOVE_RPMS
fi fi
echo $rpm_name >> $FOUND_RPMS echo $rpm_name >> $FOUND_RPMS
else else
echo $rpm_name >> $MISSING_RPMS echo $rpm_name >> $MISSING_RPMS
fi fi
else else
echo "Already have ${MDIR_BIN}/${_type}/$rpm_name" echo "Already have ${MDIR_BIN}/${_type}/$rpm_name"
echo $rpm_name >> $FOUND_RPMS echo $rpm_name >> $FOUND_RPMS
fi fi
fi fi

View File

@ -35,13 +35,13 @@ if [ ! -e ./rpms_from_centos_repo.lst ];then
exit -1 exit -1
fi fi
$rpm_downloader ./rpms_from_centos_repo.lst L1 centos | tee ./logs/log_download_rpms_from_centos_L1.txt $rpm_downloader ./rpms_from_centos_repo.lst L1 centos | tee ./logs/log_download_rpms_from_centos_L1.txt
if [ $? == 0 ]; then if [ $? == 0 ]; then
echo "finish 1st round of RPM downloading successfully!" echo "finish 1st round of RPM downloading successfully!"
if [ -e "./output/centos_rpms_missing_L1.txt" ]; then if [ -e "./output/centos_rpms_missing_L1.txt" ]; then
missing_num=`wc -l ./output/centos_rpms_missing_L1.txt | cut -d " " -f1-1` missing_num=`wc -l ./output/centos_rpms_missing_L1.txt | cut -d " " -f1-1`
if [ "$missing_num" != "0" ];then if [ "$missing_num" != "0" ];then
echo "ERROR: -------RPMs missing $missing_num in yumdownloader wit L1 match ---------------" echo "ERROR: -------RPMs missing $missing_num in yumdownloader with L1 match ---------------"
fi fi
#echo "start 2nd round of downloading Binary RPMs with L2 match criteria..." #echo "start 2nd round of downloading Binary RPMs with L2 match criteria..."
#$rpm_downloader ./output/centos_rpms_missing_L1.txt L2 centos | tee ./logs/log_download_rpms_from_centos_L2.txt #$rpm_downloader ./output/centos_rpms_missing_L1.txt L2 centos | tee ./logs/log_download_rpms_from_centos_L2.txt
@ -56,7 +56,7 @@ if [ $? == 0 ]; then
if [ -e "./output/centos_srpms_missing_L1.txt" ]; then if [ -e "./output/centos_srpms_missing_L1.txt" ]; then
missing_num=`wc -l ./output/centos_srpms_missing_L1.txt | cut -d " " -f1-1` missing_num=`wc -l ./output/centos_srpms_missing_L1.txt | cut -d " " -f1-1`
if [ "$missing_num" != "0" ];then if [ "$missing_num" != "0" ];then
echo "ERROR: --------- SRPMs missing $missing_num in yumdownloader wit L1 match ---------------" echo "ERROR: --------- SRPMs missing $missing_num in yumdownloader with L1 match ---------------"
fi fi
#echo "start 2nd round of downloading Source RPMs with L2 match criteria..." #echo "start 2nd round of downloading Source RPMs with L2 match criteria..."
#$rpm_downloader ./output/centos_srpms_missing_L1.txt L2 centos | tee ./logs/log_download_srpms_from_centos_L2.txt #$rpm_downloader ./output/centos_srpms_missing_L1.txt L2 centos | tee ./logs/log_download_srpms_from_centos_L2.txt
@ -105,8 +105,9 @@ if [ $? == 0 ];then
echo "step #3: done successfully" echo "step #3: done successfully"
fi fi
echo "IMPORTANT: The following 3 files are just bootstrap versions. Based on them, the workable images" echo "IMPORTANT: The following 3 files are just bootstrap versions. Based"
echo "for StarlingX could be generated by running \"update-pxe-network-installer\" command after \"build-iso\"" echo "on them, the workable images for StarlingX could be generated by"
echo "running \"update-pxe-network-installer\" command after \"build-iso\""
echo " - out/stx-r1/CentOS/pike/Binary/LiveOS/squashfs.img" echo " - out/stx-r1/CentOS/pike/Binary/LiveOS/squashfs.img"
echo " - out/stx-r1/CentOS/pike/Binary/images/pxeboot/initrd.img" echo " - out/stx-r1/CentOS/pike/Binary/images/pxeboot/initrd.img"
echo " - out/stx-r1/CentOS/pike/Binary/images/pxeboot/vmlinuz" echo " - out/stx-r1/CentOS/pike/Binary/images/pxeboot/vmlinuz"

10
tb.sh
View File

@ -32,7 +32,7 @@ function exec_container {
} }
function run_container { function run_container {
# create localdisk # create localdisk
mkdir -p ${LOCALDISK}/designer/${USER}/${PROJECT} mkdir -p ${LOCALDISK}/designer/${USER}/${PROJECT}
docker run -it --rm \ docker run -it --rm \
@ -73,9 +73,9 @@ case $CMD in
echo "MY_TC_RELEASE=${MY_TC_RELEASE}" echo "MY_TC_RELEASE=${MY_TC_RELEASE}"
echo "MY_REPO_ROOT_DIR=${MY_REPO_ROOT_DIR}" echo "MY_REPO_ROOT_DIR=${MY_REPO_ROOT_DIR}"
;; ;;
exec) exec)
exec_container exec_container
;; ;;
run) run)
run_container run_container
;; ;;
@ -87,7 +87,7 @@ case $CMD in
;; ;;
*) *)
echo "Unknown command: $CMD" echo "Unknown command: $CMD"
usage usage
exit 1 exit 1
;; ;;
esac esac

View File

@ -2,7 +2,7 @@
# Load tbuilder configuration # Load tbuilder configuration
if [[ -r ${HOME}/buildrc ]]; then if [[ -r ${HOME}/buildrc ]]; then
source ${HOME}/buildrc source ${HOME}/buildrc
fi fi
# start the web server # start the web server

View File

@ -21,11 +21,12 @@ commands =
-print0 | xargs -0 yamllint" -print0 | xargs -0 yamllint"
bash -c "find {toxinidir} \ bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \ -not \( -type d -name .?\* -prune \) \
-not \( -type d -path {toxinidir}/toCOPY/cgcs_overlay -prune \) \
-type f \ -type f \
-not -name \*~ \ -not -name \*~ \
-not -name \*.md \ -not -name \*.md \
-name \*.sh \ -name \*.sh \
-print0 | xargs -0 bashate -v" -print0 | xargs -0 bashate -v -iE006"
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}