[ONOS-7346] Ver.j
Change-Id: Ibdcfcc241b00379ab9f06707ce1f6725c9552715
diff --git a/jjb/OnosSystemTest/onos-test-freestyle.yaml b/jjb/OnosSystemTest/onos-test-freestyle.yaml
index b439440..e1b0607 100644
--- a/jjb/OnosSystemTest/onos-test-freestyle.yaml
+++ b/jjb/OnosSystemTest/onos-test-freestyle.yaml
@@ -212,13 +212,39 @@
builders:
- - shell: !include-raw-escape: check-style.sh
+ - shell: !include-raw-escape: pre-check-style.sh
+ - shell:
+ command: |
+ #!/bin/bash
+ cd
+ cd $WORKSPACE/OnosSystemTest/
+ modifiedFiles=$(git diff-tree --no-commit-id --name-only -r HEAD | grep \.py) || modifiedFiles=""
+ if [ -n "$modifiedFiles" ]
+ then
+ pep8 --repeat --show-source --show-pep8 --ignore=E251,E201,E302,E202,E126,E127,E203,E226,E501,W391 $modifiedFiles > $WORKSPACE/pep8Result.txt
+ else
+ touch $WORKSPACE/pep8Result.txt
+ rm -rf $WORKSPACE/OnosSystemTest/
+ echo "There were no files to code check, failing test so Jenkins doesn't comment."
+ exit 2
+ fi
+ unstable-return: 1
+ - shell: !include-raw-escape: post-check-style.sh
publishers:
- warnings:
workspace-file-scanners:
- file-pattern: pep8Result.txt
scanner: Pep8
+ messages-to-ignore: |
+ Skipping
+ file
+ of
+ module
+ /var/lib/jenkins/workspace/TestON_Style_Check/pep8Result.txt
+ because
+ it's
+ empty.
- job-template:
name: delta-nightly