File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # Audits CI configuration files to find OpenStack e2e test jobs and reports
4+ # their run_if_changed and skip_if_only_changed settings.
5+ #
6+ # Usage: ./openstack-job-audit.sh <config_base_path> [output_file]
7+ # config_base_path: Path to ci-operator/config directory
8+ # output_file: Output file path (default: ./report.yaml)
9+ #
10+ # Example: ./openstack-job-audit.sh ci-operator/config ./report.yaml
11+
12+ config_base_path=$1
13+ output_file=${2:- ./ report.yaml}
14+
15+ projects=$( grep -Rl vexxhost $config_base_path | rev | awk -F ' /' ' {print $2 "/" $3}' | rev | sort -u)
16+
17+ > " $output_file "
18+
19+ for project in ${projects[@]} ; do
20+ echo " $project :" >> " $output_file "
21+ for file in $( grep -Rl vexxhost " $config_base_path /$project /" | sort -u) ; do
22+ yq -r "
23+ \" - \(filename):\" ,
24+ (.tests[]
25+ | select(.steps.cluster_profile | match(\" .*vexxhost.*\" ))
26+ | \" - \" + .as + \" :\" +
27+ \" \n run_if_changed: \" + (.run_if_changed // \" null\" ) +
28+ \" \n skip_if_only_changed: \" + (.skip_if_only_changed // \" null\" )
29+ )
30+ " " $file " >> " $output_file "
31+ done
32+ done
You can’t perform that action at this time.
0 commit comments