diff --git a/build/ci/.code-quality-ci.yml b/build/ci/.code-quality-ci.yml
index a24ccd2615b882d7b2f0c5440fff82fa28673f2d..d2258d772f78fc4c96741b16e4a5f82a7f2eeb91 100644
--- a/build/ci/.code-quality-ci.yml
+++ b/build/ci/.code-quality-ci.yml
@@ -2,8 +2,8 @@ code-quality-master:
   image: golangci/golangci-lint:latest-alpine
   stage: test
   rules:
-    - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH
-    - if: $CI_DEFAULT_BRANCH
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
+    - if: '$CI_DEFAULT_BRANCH'
   script:
     # writes golangci-lint output to gl-code-quality-report.json
     - golangci-lint run --config build/ci/.golangci-config/.golangci-master.yml --out-format code-climate | tee gl-code-quality-report.json
@@ -19,7 +19,7 @@ code-quality:
   stage: test
   allow_failure: true
   rules:
-    - if: $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME != $CI_DEFAULT_BRANCH'
   script:
     # writes golangci-lint output to gl-code-quality-report.json
     - golangci-lint run --config build/ci/.golangci-config/.golangci.yml --out-format code-climate | tee gl-code-quality-report.json