Forráskód Böngészése

HUE-9371 [ci] Make sure that failing lints fail the CI

Romain 5 éve
szülő
commit
8f0c1f038a
2 módosított fájl, 14 hozzáadás és 3 törlés
  1. 12 3
      .circleci/config.yml
  2. 2 0
      tools/ci/check_for_python_lint.sh

+ 12 - 3
.circleci/config.yml

@@ -107,14 +107,23 @@ jobs:
       - run:
           name: run python lints
           command: |
-            cd /usr/share/hue
+            cd ~/repo
 
             ./tools/ci/check_for_python_lint.sh
-            ./tools/ci/check_for_commit_message.sh
+            if [ "$?" -ne "0" ]
+            then
+              exit 1
+            fi
 
             cd ~/repo
 
-            ./tools/ci/check_for_invalid_characters.sh
+            ./tools/ci/check_for_commit_message.sh
+            if [ "$?" -ne "0" ]
+            then
+              exit 1
+            fi
+
+            ./tools/ci/check_for_invalid_characters.sh  # no-op currently
 
       - run:
           name: run js lint

+ 2 - 0
tools/ci/check_for_python_lint.sh

@@ -21,6 +21,8 @@ FOUND_ISSUE=-1
 
 files=`git diff --name-only origin/master --diff-filter=b | egrep .py$ | grep -v /ext-py/`
 
+cd /usr/share/hue
+
 if [ ! -z "$files" ];
 then
   ./build/env/bin/hue runpylint --files "$files"