diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df4752c5799157cf651c48e272842e1b8b1d9f74..11f04db694df45a6401981ea2d9c465194defdef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,13 +6,15 @@ image: registry.gitlab.ics.muni.cz:443/cloud/g2/common-cloud-entities:1.0.2 pylint: stage: test + variables: + MIN_PYLINT_RATING: "8.0" before_script: - python3 -m pip install -r ci/requirements.pip > pymodules-install.log script: - pylint --exit-zero --max-line-length 200 ci/*.py &> pylint.log - grep 'Your code has been rated' pylint.log - - rank=$(grep 'Your code has been rated' pylint.log | grep -Eo '[0-9]+(\.[0-9]+)?' | head -1) - - awk -v "rank=${rank}" -v "min_rank=9.0" 'BEGIN{ if(rank<min_rank){exit(126)} }' + - rating=$(grep 'Your code has been rated' pylint.log | grep -Eo '[0-9]+(\.[0-9]+)?' | head -1) + - awk -v "r=${rating}" -v "min_r=${MIN_PYLINT_RATING}" 'BEGIN{ if(r<min_r){exit(126)} }' artifacts: expire_in: 1 mo when: always