]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-build-pull-requests: Use shellcheck_job.py 2416/head
authorZack Cerza <zack@cerza.org>
Thu, 31 Jul 2025 19:30:40 +0000 (13:30 -0600)
committerZack Cerza <zack@cerza.org>
Tue, 19 Aug 2025 20:38:07 +0000 (14:38 -0600)
Signed-off-by: Zack Cerza <zack@cerza.org>
ceph-build-pull-requests/build/build

index 089942ddd6550bc97d0e7e9f6a69895805b855b0..aab998808fa77ed1bb07393d51fef6756ac8a43b 100644 (file)
@@ -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