From: chengli3 Date: Wed, 30 Oct 2019 14:22:58 +0000 (+0800) Subject: Exclude vendor directory and ignore several err X-Git-Tag: v0.4.0~66^2 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=06e42f9aff0d369a8d7f4f48b309f313003f2d7e;p=icn.git Exclude vendor directory and ignore several err Change-Id: Ic6cf693d02a4a0885143c51c7ebfae1c7ff07f3f --- diff --git a/Makefile b/Makefile index 3a875ca..ffc6e97 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ bpa_op_verifier: bpa_op_install bpa_op_e2e bpa_op_all: bm_all bpa_op_install bashate: - bashate -i E006 `find . -name *.sh` + bashate -i E006,E003,E002,E010,E011,E042,E043 `find . -type f -not -path './cmd/bpa-operator/vendor/*' -name *.sh` prerequisite: pushd $(ENV) && ./cd_package_installer.sh && popd diff --git a/cmd/bpa-operator/e2etest/bpa_e2e_test.sh b/cmd/bpa-operator/e2etest/bpa_e2e_test.sh index 13fb588..a537e84 100755 --- a/cmd/bpa-operator/e2etest/bpa_e2e_test.sh +++ b/cmd/bpa-operator/e2etest/bpa_e2e_test.sh @@ -30,4 +30,4 @@ printf "\n\nBeginning E2E Test Teardown\n\n" kubectl delete -f e2e_test_provisioning_cr.yaml kubectl delete -f bmh-bpa-test.yaml kubectl delete job kud-cluster-test -vagrant destroy -f +vagrant destroy -f diff --git a/deploy/metal3-vm/03_launch_mgmt_cluster.sh b/deploy/metal3-vm/03_launch_mgmt_cluster.sh index 827246b..ab25c73 100755 --- a/deploy/metal3-vm/03_launch_mgmt_cluster.sh +++ b/deploy/metal3-vm/03_launch_mgmt_cluster.sh @@ -32,7 +32,7 @@ BM_IMAGE=${BM_IMAGE:-"bionic-server-cloudimg-amd64.img"} IMAGE_URL=http://172.22.0.1/images/${BM_IMAGE} IMAGE_CHECKSUM=http://172.22.0.1/images/${BM_IMAGE}.md5sum -function clone_repos() { +function clone_repos { mkdir -p "${M3PATH}" if [[ -d ${BMOPATH} && "${FORCE_REPO_UPDATE}" == "true" ]]; then rm -rf "${BMOPATH}" @@ -48,7 +48,7 @@ function clone_repos() { popd } -function launch_baremetal_operator() { +function launch_baremetal_operator { pushd "${BMOPATH}" if [ "${BMO_RUN_LOCAL}" = true ]; then touch bmo.out.log @@ -121,7 +121,7 @@ EOF kubectl apply -n metal3 -f $name-user-data-credential.yaml } -function make_bm_hosts() { +function make_bm_hosts { while read -r name address user password mac; do create_userdata $name apply_userdata_credential $name @@ -141,7 +141,7 @@ function make_bm_hosts() { done } -function apply_bm_hosts() { +function apply_bm_hosts { list_nodes | make_bm_hosts } diff --git a/deploy/metal3-vm/04_verify.sh b/deploy/metal3-vm/04_verify.sh index 84b69f6..65301b5 100755 --- a/deploy/metal3-vm/04_verify.sh +++ b/deploy/metal3-vm/04_verify.sh @@ -9,14 +9,14 @@ node=0 declare -i timeout=30 declare -i interval=60 -function check_num_hosts() { +function check_num_hosts { while read -r name address user password mac; do ((node+=1)) done return $node } -function check_bm_state() { +function check_bm_state { c=1 n=$1 while [ $c -le $n ] @@ -26,7 +26,7 @@ function check_bm_state() { done } -function check_provisioned() { +function check_provisioned { declare -i prev_host_state=0 declare -i j=0 while read -r name address user password mac; do @@ -60,7 +60,7 @@ function check_provisioned() { return $prev_host_state } -function wait_for_provisioned() { +function wait_for_provisioned { all_bmh_provisioned=1 while ((timeout > 0)); do echo "Try $timeout: Wait for $interval seconds to check all bmh state" @@ -76,7 +76,7 @@ function wait_for_provisioned() { exit 1 } -function verify_bm_hosts() { +function verify_bm_hosts { #list_nodes | check_num_hosts #nodes=$? #check_bm_state $nodes diff --git a/deploy/metal3-vm/lib/common.sh b/deploy/metal3-vm/lib/common.sh index 2bf0aa3..7a32c49 100644 --- a/deploy/metal3-vm/lib/common.sh +++ b/deploy/metal3-vm/lib/common.sh @@ -107,7 +107,7 @@ if [ ! -d "$WORKING_DIR" ]; then chmod 755 "$WORKING_DIR" fi -function list_nodes() { +function list_nodes { # Includes -machine and -machine-namespace cat $NODES_FILE | \ jq '.nodes[] | { diff --git a/env/lib/common.sh b/env/lib/common.sh index e3a8bd6..4b8471b 100755 --- a/env/lib/common.sh +++ b/env/lib/common.sh @@ -72,7 +72,7 @@ function call_api { fi } -function list_nodes() { +function list_nodes { NODES_FILE="${IRONIC_DATA_DIR}/nodes.json" cat "$NODES_FILE" | \ jq '.nodes[] | {