From 04c253b6d99db68ad90257861b3320e84bae7cf3 Mon Sep 17 00:00:00 2001 From: Melissa Avery-Weir Date: Tue, 13 Aug 2013 14:52:32 -0400 Subject: [PATCH] Basic build-related scripts added. --- .gitignore | 1 + jenkins/fabfile.py | 1 + jenkins/jslint-files-to-exclude.txt | 1 + jenkins/pyflakes.sh | 1 + jenkins/pylint.sh | 4 ++++ jenkins/sloccount.sh | 1 + 6 files changed, 9 insertions(+) create mode 100644 .gitignore create mode 100644 jenkins/jslint-files-to-exclude.txt create mode 100644 jenkins/pyflakes.sh create mode 100644 jenkins/pylint.sh create mode 100644 jenkins/sloccount.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e99e36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc \ No newline at end of file diff --git a/jenkins/fabfile.py b/jenkins/fabfile.py index 6dea486..c551cf2 100644 --- a/jenkins/fabfile.py +++ b/jenkins/fabfile.py @@ -7,6 +7,7 @@ env.user = 'root' def deploy_clean_jenkins(): run('wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war') run('cp jenkins.war /var/lib/tomcat7/webapps') + run('chmod -R 0777 /usr/share/tomcat7') def deploy_scripts(): return diff --git a/jenkins/jslint-files-to-exclude.txt b/jenkins/jslint-files-to-exclude.txt new file mode 100644 index 0000000..77e0002 --- /dev/null +++ b/jenkins/jslint-files-to-exclude.txt @@ -0,0 +1 @@ +**/jasmine*.js,**/jquery*.js,**/angular*.js,**/bootstrap*.js,**/build/**/*.js,**/libs/**/*.js,**/publish/public/js/*.js,**/site/js/plugins.js \ No newline at end of file diff --git a/jenkins/pyflakes.sh b/jenkins/pyflakes.sh new file mode 100644 index 0000000..977b827 --- /dev/null +++ b/jenkins/pyflakes.sh @@ -0,0 +1 @@ +find . -name '*.py'|egrep -v '^./tests/|^./build/'|xargs pyflakes > pyflakes.log || : \ No newline at end of file diff --git a/jenkins/pylint.sh b/jenkins/pylint.sh new file mode 100644 index 0000000..5a7df10 --- /dev/null +++ b/jenkins/pylint.sh @@ -0,0 +1,4 @@ +rm -f pylint.log +for f in `find . -name '*.py'|egrep -v '^./tests/|^./build/'`; do +pylint --output-format=parseable --disable=W0311,W0403,W0232,E1101 --generated-members=objects,content,status_code --reports=y $f >> pylint.log +done || : \ No newline at end of file diff --git a/jenkins/sloccount.sh b/jenkins/sloccount.sh new file mode 100644 index 0000000..025dc12 --- /dev/null +++ b/jenkins/sloccount.sh @@ -0,0 +1 @@ +sloccount --duplicates --wide --details . | fgrep -v build > sloccount.sc || : \ No newline at end of file