This Gitlab include Scan and rate a Quality Gate from project.
This template officially supports the following project ecosystems:
dotnet: For .NET and .NET Core projects (.csprojor.sln).node: For any JavaScript/TypeScript project that uses npm (package.json), including frontend (React, Vue, Angular) and backend (Node.js) applications.
This include needs tags on your runners named "amd64" because de architecture is amd64(x86) on Sonarqube CLI and Docker Image base used
| Input | Description | Default | Required |
|---|---|---|---|
stage |
The GitLab CI/CD stage where the SonarQube job will run. | sonarqube |
No |
environment |
The GitLab CI/CD Environment where the SonarQube job will pull variables values. | sonarqube |
No |
language |
The project type to be scanned. Accepted values: dotnet, node. |
- | Yes |
dotnet_version |
The .NET SDK version to use for the analysis. | 8.0 |
Only for dotnet |
dotnet_path_sln_or_csproj |
The relative path to your .sln or .csproj file. |
- | Yes, for dotnet |
dotnet_version: .NET version utilized in csproj or sln file.dotnet_path_sln_or_csproj: Path to .csproj or .sln file in your project.
And necessary Variables on your Gitlab environment(default is "sonarqube")
SONAR_PROJECT_KEY: Your Sonarqube project KeySONAR_HOST_URL: Your Sonarqube host urlSONAR_TOKEN: Your Sonarqube token
Add the following to your .gitlab-ci.yml file.
include:
- remote: 'https://raw.githubusercontent.com/Tooark/sonarqube-template-include/main/.gitlab-ci.yml'
inputs:
language: "dotnet"
dotnet_version: "9.0"
dotnet_path_sln_or_csproj: "./src/my-project.sln" # or my-project.csprojinclude:
- remote: 'https://raw.githubusercontent.com/Tooark/sonarqube-template-include/main/.gitlab-ci.yml'
inputs:
language: "node"Contributions are welcome! Feel free to open issues and pull requests in the Notification Trigger Url repository.
The following users are contributing to the project:
| Stenio Ignacio |