RESOLVED - Help custom codequality

Hello,

i try to make a workflow with ruff for python as code review

i was able to generate the .json for the codequality artifacts

it is detected however i still have this issue :

Base pipeline codequality artifact not found

for what i understand, the codequality must be compared to a main one, but i’m not sure how to get/generate it.

we are using gitlab: 14.10.5 self hosted

and there is my code_quality job:

code_quality:
  stage: test

  rules:
    - if: "$CI_PIPELINE_SOURCE == 'merge_request_event'"
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
      when: never
    - if: "$CI_PIPELINE_SOURCE == 'push' && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH"
    
 
  image: "python:3.10"

  before_script:
    - 'pip3 install ruff'

  script:
    - ruff ./ --exclude conftest.py --format gitlab > gl-code-quality-report.json
`

  artifacts:
    name: "${CI_PROJECT_NAME}_code_quality"
    when: always
    reports:
      codequality: gl-code-quality-report.json
      
    expire_in: never

can somehow help me understand how to make it work, some time it work without me changing anything

Since we update to 15.8.1, code quality only show as no change

so i finally got it working,

if someone else is having issue and have the same trouble as me, make sure you have this rules:

 - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # RUN QUALITY JOB IN PIPELINE ON THE DEFAULT BRANCH(BUT NOT IN OTHER BRANCH)