Skip to content

Commit

Permalink
Add JENKINS_TASKS to django_jenkins
Browse files Browse the repository at this point in the history
New tasks include run_pylint, run_pep8, run_pyflakes, run_jshint and
run_csslint.
  • Loading branch information
jlaska committed Jun 5, 2014
1 parent 859cc65 commit f0fe667
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ socketservice:
$(PYTHON) manage.py run_socketio_service

pep8:
pep8 -r --ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241 --exclude awx/lib/site-packages awx/
pep8 -r awx/

pyflakes:
pyflakes awx/
Expand All @@ -175,7 +175,7 @@ test_tox:

# Run unit tests to produce output for Jenkins.
test_jenkins:
$(PYTHON) manage.py jenkins -v2
$(PYTHON) manage.py jenkins -v2 --csslint-exclude "*.min.css" --jslint-exclude "*.min.js"

package.json:
sed -e 's/%NAME%/$(NAME)/;s/%VERSION%/$(VERSION)/' packaging/grunt/package.template > $@
Expand Down
16 changes: 16 additions & 0 deletions awx/settings/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import sys
import glob
from datetime import timedelta

# Update this module's local settings from the global settings module.
Expand Down Expand Up @@ -496,3 +497,18 @@
},
}
}

if 'django_jenkins' in INSTALLED_APPS:
JENKINS_TASKS = (
'django_jenkins.tasks.with_coverage',
'django_jenkins.tasks.run_pylint',
'django_jenkins.tasks.run_pep8',
'django_jenkins.tasks.run_pyflakes',
'django_jenkins.tasks.run_jshint',
'django_jenkins.tasks.run_csslint',
)
PEP8_RCFILE = "setup.cfg"
CSSLINT_CHECKED_FILES = [os.path.join(BASE_DIR, 'ui/static/less')]
JSHINT_CHECKED_FILES = [os.path.join(BASE_DIR, 'ui/static/js'),
os.path.join(BASE_DIR, 'ui/static/lib/ansible'),]

3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pep8]
ignore=E501,E221,W291,W391,E302,E251,E203,W293,E231,E303,E201,E225,E261,E241
exclude=awx/lib/site-packages

0 comments on commit f0fe667

Please sign in to comment.