On this project: https://gitlab.com/tyvain/parcoursup/tree/master
I have a code quality stage:
code_quality:
stage: code_quality
image: docker:stable
variables:
DOCKER_DRIVER: overlay2
allow_failure: true
services:
- docker:stable-dind
script:
- export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- docker run
--env SOURCE_CODE="$PWD"
--volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
paths: [gl-code-quality-report.json]
This stage always endup 'passed'. Logs: https://gitlab.com/tyvain/parcoursup/-/jobs/94665791
I doubt that my code is perfect, so there should be some code quality issues somewhere.
Where is the code quality report supposed to be output ?
What is this parameter: "paths: [gl-code-quality-report.json]" ?
Authenticate with GitLab - Sign in to SonarQube with your GitLab credentials. Import your GitLab projects - Import your GitLab Projects into SonarQube to easily set up SonarQube projects. Analyze projects with GitLab CI/CD - Integrate analysis into your build pipeline.
Artifacts are files generated through a process that we use Job or Pipeline. Of course, it's not all Jobs that create files, but if your projects generate files, we can use the GitLab Artifacts to manage the files for us. Gitlab will store that artifact, and we can download it using the UI or calling the API.
Comments begin with the number sign (#), can start anywhere on a line and continue until the end of the line. Comments must be separated from other tokens by whitespace characters.
2 problems here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With