Skip to content

Commit

Permalink
Merge pull request openshift#280 from jlebon/pr/yaml-check
Browse files Browse the repository at this point in the history
ci: Also syntax check YAML files
  • Loading branch information
openshift-merge-robot authored Sep 6, 2018
2 parents 6ea36c0 + f684c81 commit 96855cc
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 96855cc

Please sign in to comment.