Currently, project administrators are not guided to set up their branch & PR analysis via GitLab CI. They have to check the documentation to understand how to analyze their projects. We should provide a good guidance to project administrators so that they can easily integrate quality in their dev pipeline.
We want to provide a tutorial to help users analyze their GitLab project in GitLab CI, as we do Bitbucket Server and GitHub projects in Jenkins.
As a project administrator, after I create my project, I am guided to set up the analysis of my project:
- Manually: from my local machine for a test, or from an external CI for which we don't provide guidelines.
- With GitLab CI:
- I do not have an existing pipeline: I have received some help to create my pipeline
- I have an existing pipeline: I can see from the tutorial what is recommended so that I can adapt my pipeline
As a project administrator who wants to analyze with GitLab CI, I expect to know what are the steps to be guided to set up my quality analysis for master, branches, and PR directly in the product:
- I have a checklist to ensure that I have the correct setup
- I can follow the different steps to set up my analysis
- I can copy/paste the scripts when needed
- I understand that after the next analysis launched on GitLab CI, the results of the analysis will appear on SQ.
The tutorial can be inspired from SonarCloud, with few adjustments:
- Configure your project:
Depending on your project, a sonar-project.properties file should be created, your maven our gradle configuration should be updated
- Declare environment variables:
SONAR_HOST and SONAR_TOKEN should be masked (recommendation) but unprotected (must-have, because by default on gitlab.com branches and PRs are not protected)
- Create or update your yml file
The documentation should be updated accordingly with:
- cache instructions
- the use of environment variables for SONAR_HOST AND SONAR_TOKEN