diff options
author | Tim Bielawa <timbielawa@gmail.com> | 2016-12-12 11:39:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 11:39:44 -0800 |
commit | 7374505de2a11b94d22672b8da7e405b919a15bc (patch) | |
tree | 51881c3f16f1f7368bdbf62e0478a6c292a5470a /utils | |
parent | 91fba8015e9e8035cca2444dbbc8954a27e2310e (diff) | |
parent | be97433dd559a3bdae4baedda20a7f17bd47450b (diff) | |
download | openshift-7374505de2a11b94d22672b8da7e405b919a15bc.tar.gz openshift-7374505de2a11b94d22672b8da7e405b919a15bc.tar.bz2 openshift-7374505de2a11b94d22672b8da7e405b919a15bc.tar.xz openshift-7374505de2a11b94d22672b8da7e405b919a15bc.zip |
Merge pull request #2964 from mtnbikenc/linting-refactor
YAML Linting with CI checking
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Makefile | 16 | ||||
-rw-r--r-- | utils/test-requirements.txt | 1 |
2 files changed, 14 insertions, 3 deletions
diff --git a/utils/Makefile b/utils/Makefile index ad6735cb5..c061edd8c 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -32,6 +32,10 @@ ASCII2MAN = a2x -D $(dir $@) -d manpage -f manpage $< MANPAGES := docs/man/man1/atomic-openshift-installer.1 VERSION := 1.3 +# YAMLFILES: Skipping all '/files/' folders due to conflicting yaml file definitions +YAMLFILES = $(shell find ../ -name $(VENV) -prune -o \( -name '*.yml' -o -name '*.yaml' \) ! -path "*/files/*" 2>&1) +PYFILES = $(shell find ../ -name $(VENV) -prune -o -name ooinstall.egg-info -prune -o -name test -prune -o -name "*.py" -print) + sdist: clean python setup.py sdist rm -fR $(SHORTNAME).egg-info @@ -86,7 +90,13 @@ ci-pylint: $(VENV) @echo "#############################################" @echo "# Running PyLint Tests in virtualenv" @echo "#############################################" - . $(VENV)/bin/activate && python -m pylint --rcfile ../git/.pylintrc $(shell find ../ -name $(VENV) -prune -o -name ooinstall.egg-info -prune -o -name test -prune -o -name "*.py" -print) + . $(VENV)/bin/activate && python -m pylint --rcfile ../git/.pylintrc $(PYFILES) + +ci-yamllint: $(VENV) + @echo "#############################################" + @echo "# Running yamllint Tests in virtualenv" + @echo "#############################################" + @. $(VENV)/bin/activate && yamllint -c ../git/.yamllint $(YAMLFILES) ci-list-deps: $(VENV) @echo "#############################################" @@ -101,9 +111,9 @@ ci-flake8: $(VENV) . $(VENV)/bin/activate && flake8 --config=setup.cfg ../ --exclude="utils,../inventory" . $(VENV)/bin/activate && python setup.py flake8 -ci: ci-list-deps ci-unittests ci-flake8 ci-pylint +ci: ci-list-deps ci-unittests ci-flake8 ci-pylint ci-yamllint @echo @echo "##################################################################################" @echo "VIEW CODE COVERAGE REPORT WITH 'xdg-open cover/index.html' or run 'make viewcover'" @echo "To clean your test environment run 'make clean'" - @echo "Other targets you may run with 'make': 'ci-pylint', 'ci-unittests', 'ci-flake8'" + @echo "Other targets you may run with 'make': 'ci-pylint', 'ci-unittests', 'ci-flake8', 'ci-yamllint'" diff --git a/utils/test-requirements.txt b/utils/test-requirements.txt index eeaf106ec..b70a03563 100644 --- a/utils/test-requirements.txt +++ b/utils/test-requirements.txt @@ -10,3 +10,4 @@ PyYAML click backports.functools_lru_cache pyOpenSSL +yamllint |