Skip to content

Commit

Permalink
Fix null check in CI (#1149)
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <[email protected]>
  • Loading branch information
j-rivero authored May 31, 2024
1 parent fce6534 commit 82136b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jenkins-scripts/dsl/dsl_checks.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ if [[ -z $(ls -- *.xml) ]]; then
exit 1
fi

not_null=$(grep -3 'null' -- *.xml || true)
# Some XML generated files include valid Groovy code using null
# like the _outdated_jobs job. Do not search for null unconditionally
not_null=$(grep -3 '>.*null.*<' -- *.xml || true)
if [[ -n ${not_null} ]]; then
echo "Found a null value in a configuration file:"
echo "${not_null}"
Expand Down

0 comments on commit 82136b3

Please sign in to comment.