]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-container-flake8: Using project's tox.ini 999/head
authorErwan Velu <erwan@redhat.com>
Mon, 9 Apr 2018 13:00:47 +0000 (15:00 +0200)
committerErwan Velu <erwan@redhat.com>
Mon, 9 Apr 2018 13:51:13 +0000 (15:51 +0200)
The current code is running flake8 from a container to check every
python file changed by a PR.

The actual code doesn't import the tox.ini of ceph-container which
specify a particular configuration like "max-line-length = 99"

This lead to a situation where a dev which runs flake on his dev env
have a flake reporting now failures while flake from the CI fails.

So this patch is about adding project's tox.ini inside the container to
insure flake is using it.

ceph-container-flake8/build/build

index 50991ddbf1fb0cd3cf0d0316661f926377649636..15532a25065182c74468849b4c049bb03ecf5972 100755 (executable)
@@ -21,7 +21,7 @@ function check(){
     while read -r filename; do
         pushd "$(dirname "$filename")"
         file=$(basename "$filename")
-        sudo docker run --rm -v "$(pwd)"/"$file":/"$file" eeacms/flake8 /"$file"
+        sudo docker run --rm -v "$(pwd)"/tox.ini:/tox.ini -v "$(pwd)"/"$file":/"$file" eeacms/flake8 /"$file"
         popd
     done
     return $?