Эх сурвалжийг харах

HUE-9371 [ci] Extract the git home path so that it is not hardcoded

Romain 5 жил өмнө
parent
commit
e0abb85a76

+ 4 - 1
.circleci/config.yml

@@ -109,7 +109,9 @@ jobs:
           command: |
           command: |
             cd ~/repo
             cd ~/repo
 
 
-            ./tools/ci/check_for_python_lint.sh
+            /usr/share/hue/build/env/bin/pip install pylint==1.7.5 pylint-django==0.7.2
+            ./tools/ci/check_for_python_lint.sh /usr/share/hue
+
             if [ "$?" -ne "0" ]
             if [ "$?" -ne "0" ]
             then
             then
               exit 1
               exit 1
@@ -118,6 +120,7 @@ jobs:
             cd ~/repo
             cd ~/repo
 
 
             ./tools/ci/check_for_commit_message.sh
             ./tools/ci/check_for_commit_message.sh
+
             if [ "$?" -ne "0" ]
             if [ "$?" -ne "0" ]
             then
             then
               exit 1
               exit 1

+ 2 - 1
tools/ci/check_for_python_lint.sh

@@ -17,11 +17,12 @@
 
 
 # Checking all python changes in the new commits
 # Checking all python changes in the new commits
 
 
+HOME=${1:-"."}
 FOUND_ISSUE=-1
 FOUND_ISSUE=-1
 
 
 files=`git diff --name-only origin/master --diff-filter=b | egrep .py$ | grep -v /ext-py/`
 files=`git diff --name-only origin/master --diff-filter=b | egrep .py$ | grep -v /ext-py/`
 
 
-cd /usr/share/hue
+cd $HOME
 
 
 if [ ! -z "$files" ];
 if [ ! -z "$files" ];
 then
 then