From: Zack Cerza Date: Thu, 31 Jul 2025 19:30:40 +0000 (-0600) Subject: ceph-build-pull-requests: Use shellcheck_job.py X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4ba678003e2531b294ced1fdcda053859fe21b91;p=ceph-build.git ceph-build-pull-requests: Use shellcheck_job.py Signed-off-by: Zack Cerza --- diff --git a/ceph-build-pull-requests/build/build b/ceph-build-pull-requests/build/build index 089942dd..aab99880 100644 --- a/ceph-build-pull-requests/build/build +++ b/ceph-build-pull-requests/build/build @@ -3,12 +3,12 @@ set -e # the following two methods exist in scripts/build_utils.sh -pkgs=( "ansible" "ansible-core" "git+https://opendev.org/jjb/jenkins-job-builder@60f0316389" "urllib3==1.26.1" "pyopenssl" "ndg-httpsclient" "pyasn1" ) +pkgs=( "ansible" "ansible-core" "git+https://opendev.org/jjb/jenkins-job-builder@60f0316389" "urllib3==1.26.1" "pyopenssl" "ndg-httpsclient" "pyasn1" "xmltodict" ) TEMPVENV=$(create_venv_dir) VENV=${TEMPVENV}/bin install_python_packages $TEMPVENV "pkgs[@]" - +rm -rf xml # Test every definition if available in the current repository and update the jobs # if they do define one (they should always define their definitions) for dir in `find . -maxdepth 1 -path ./.git -prune -o -type d -print`; do @@ -17,10 +17,13 @@ for dir in `find . -maxdepth 1 -path ./.git -prune -o -type d -print`; do echo "found definitions directory: $definitions_dir" # Test the definitions - $VENV/jenkins-jobs test $definitions_dir --config-xml > /dev/null + $VENV/jenkins-jobs test $definitions_dir --config-xml -o ./xml > /dev/null fi done +dpkg -l shellcheck >/dev/null 2>&1 || sudo apt install -y shellcheck +PATH=$PATH:$VENV find ./xml -name '*.xml' -print0 | xargs -0 -L1 "$WORKSPACE/scripts/shellcheck_job.py" + # install ansible-galaxy roles for playbook syntax check for reqs in $WORKSPACE/ansible/requirements/*; do $VENV/ansible-galaxy install -r $reqs -p $WORKSPACE/ansible/roles --force