Skip to content

Commit

Permalink
ci: Also syntax check YAML files
Browse files Browse the repository at this point in the history
Now that we mostly work in YAML files rather than JSON, let's adapt our
checks accordingly.
  • Loading branch information
jlebon committed Sep 6, 2018
1 parent 163986a commit f684c81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .prow.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -xeuo pipefail

yum -y install jq
yum -y install jq PyYAML
make syntax-check
# And disable the container again until we figure out about Prow -> internal
# make container
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ syntax-check:
jq < $${jsonfile} . >/dev/null; \
echo "OK"; \
done
@set -e; for yamlfile in $$(find ${ROOT_DIR} -name '*.yaml' -o -name '*.yml'); do \
echo -n "Checking YAML syntax for $${yamlfile}... "; \
python -c "import yaml; yaml.safe_load(open('$${yamlfile}'))"; \
echo "OK"; \
done

.PHONY: repo-refresh
repo-refresh:
Expand Down

0 comments on commit f684c81

Please sign in to comment.