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:
check:
jobs:
- openstack-tox-linters:
voting: false
- openstack-tox-linters
gate:
jobs:
- openstack-tox-linters:
voting: false
- openstack-tox-linters

View File

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

View File

@ -35,13 +35,13 @@ if [ ! -e ./rpms_from_centos_repo.lst ];then
exit -1
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
echo "finish 1st round of RPM downloading successfully!"
if [ -e "./output/centos_rpms_missing_L1.txt" ]; then
missing_num=`wc -l ./output/centos_rpms_missing_L1.txt | cut -d " " -f1-1`
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
#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
@ -56,7 +56,7 @@ if [ $? == 0 ]; then
if [ -e "./output/centos_srpms_missing_L1.txt" ]; then
missing_num=`wc -l ./output/centos_srpms_missing_L1.txt | cut -d " " -f1-1`
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
#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
@ -105,8 +105,9 @@ if [ $? == 0 ];then
echo "step #3: done successfully"
fi
echo "IMPORTANT: The following 3 files are just bootstrap versions. Based on them, the workable images"
echo "for StarlingX could be generated by running \"update-pxe-network-installer\" command after \"build-iso\""
echo "IMPORTANT: The following 3 files are just bootstrap versions. Based"
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/images/pxeboot/initrd.img"
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 {
# create localdisk
# create localdisk
mkdir -p ${LOCALDISK}/designer/${USER}/${PROJECT}
docker run -it --rm \
@ -73,9 +73,9 @@ case $CMD in
echo "MY_TC_RELEASE=${MY_TC_RELEASE}"
echo "MY_REPO_ROOT_DIR=${MY_REPO_ROOT_DIR}"
;;
exec)
exec_container
;;
exec)
exec_container
;;
run)
run_container
;;
@ -87,7 +87,7 @@ case $CMD in
;;
*)
echo "Unknown command: $CMD"
usage
usage
exit 1
;;
esac

View File

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

View File

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