forked from os-autoinst/os-autoinst-distri-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hide CI passed logs for yaml files checking
- Loading branch information
Showing
2 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash -e | ||
|
||
success=1 | ||
YAMLS=$(git ls-files schedule/ test_data/ | grep '.ya\?ml$' | xargs echo) | ||
|
||
if test -n "$YAMLS"; then | ||
export PERL5LIB=${PERL5LIB_} ; echo "$YAMLS" | xargs tools/test_yaml_valid | grep -Ev "has valid yaml syntax|has valid schema"; | ||
which yamllint >/dev/null 2>&1 || (echo "Command 'yamllint' not found, can not execute YAML syntax checks" && exit 1) || success=0; | ||
echo "$YAMLS" | xargs yamllint -c .yamllint || exit 1 || success=0; | ||
else | ||
echo "No yamls modified."; | ||
fi | ||
[ $success = 1 ] && echo "check_yaml SUCCESS" && exit 0 | ||
exit 1 |