Commit fdb1a81b authored by Dmitry Volodin's avatar Dmitry Volodin
Browse files

Merge branch 'noc-lint-no-del' into 'master'

gitlab ci: Do not try to lint deleted files

See merge request noc/noc!4224
parents 683141d7 39be3922
...@@ -14,7 +14,7 @@ check labels: ...@@ -14,7 +14,7 @@ check labels:
stage: Lint stage: Lint
image: registry.getnoc.com/infrastructure/noc-py-lint:master image: registry.getnoc.com/infrastructure/noc-py-lint:master
script: script:
- FLIST=$(git --no-pager diff --name-only $(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA) $CI_COMMIT_SHA) - FLIST=$(git --no-pager diff --diff-filter=d --name-only $(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA) $CI_COMMIT_SHA)
- python ./scripts/check-labels.py --junit-report=build/reports/labels-junit.xml $FLIST - python ./scripts/check-labels.py --junit-report=build/reports/labels-junit.xml $FLIST
only: only:
- merge_requests - merge_requests
...@@ -32,7 +32,7 @@ flake8: ...@@ -32,7 +32,7 @@ flake8:
image: registry.getnoc.com/infrastructure/noc-py-lint:master image: registry.getnoc.com/infrastructure/noc-py-lint:master
script: script:
- set -x - set -x
- FLIST=$(git --no-pager diff --name-only $(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA) $CI_COMMIT_SHA | egrep ".py$" | grep -v ".docker/"|| true) - FLIST=$(git --no-pager diff --diff-filter=d --name-only $(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA) $CI_COMMIT_SHA | egrep ".py$" | grep -v ".docker/"|| true)
- > - >
if [ ! -z "$FLIST" ]; if [ ! -z "$FLIST" ];
then then
...@@ -141,7 +141,7 @@ pylint: ...@@ -141,7 +141,7 @@ pylint:
image: registry.getnoc.com/infrastructure/noc-py-lint:master image: registry.getnoc.com/infrastructure/noc-py-lint:master
script: script:
- set -x - set -x
- FLIST=$(git --no-pager diff --name-only $(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA) $CI_COMMIT_SHA | egrep ".py$" | grep -v ".docker/"|| true) - FLIST=$(git --no-pager diff --diff-filter=d --name-only $(git merge-base origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME $CI_COMMIT_SHA) $CI_COMMIT_SHA | egrep ".py$" | grep -v ".docker/"|| true)
- > - >
if [ ! -z "$FLIST" ]; if [ ! -z "$FLIST" ];
then then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment