From 4e4018e00b28a9c0d88e4d3b2f9d05e9ec6c541c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Franti=C5=A1ek=20=C5=98ezn=C3=AD=C4=8Dek?=
 <246254@mail.muni.cz>
Date: Tue, 5 Mar 2024 15:31:34 +0100
Subject: [PATCH] Update .gitlab-ci.yml file

---
 .gitlab-ci.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index df4752c..11f04db 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
-- 
GitLab