Przeglądaj źródła

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

Romain 5 lat temu
rodzic
commit
e0abb85a76
2 zmienionych plików z 6 dodań i 2 usunięć
  1. 4 1
      .circleci/config.yml
  2. 2 1
      tools/ci/check_for_python_lint.sh

+ 4 - 1
.circleci/config.yml

@@ -109,7 +109,9 @@ jobs:
           command: |
             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" ]
             then
               exit 1
@@ -118,6 +120,7 @@ jobs:
             cd ~/repo
 
             ./tools/ci/check_for_commit_message.sh
+
             if [ "$?" -ne "0" ]
             then
               exit 1

+ 2 - 1
tools/ci/check_for_python_lint.sh

@@ -17,11 +17,12 @@
 
 # Checking all python changes in the new commits
 
+HOME=${1:-"."}
 FOUND_ISSUE=-1
 
 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" ];
 then