Commit b4a43814 authored by Marc Barussaud's avatar Marc Barussaud
Browse files

Merge branch 'feat/tbc-default-for-global-dependencies' into 'main'

feat: TBC_DEFAULT for global dependencies

See merge request to-be-continuous/sonar!68
parents 8050591f a75b59c5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ It is bound to the `test` stage, and uses the following variables:

| Input / Variable | Description                     | Default value |
| ------------------------ | ------------------------------- | ----------------------------- |
| `scanner-image` / `SONAR_SCANNER_IMAGE` | The Docker image used to run [sonar-scanner](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/sonarscanner/) | `docker.io/sonarsource/sonar-scanner-cli:latest` <br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-SONAR_SCANNER_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-SONAR_SCANNER_IMAGE) |
| `scanner-image` / `SONAR_SCANNER_IMAGE` | The Docker image used to run [sonar-scanner](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/sonarscanner/) | `docker.io/sonarsource/sonar-scanner-cli:latest` (from `$TBC_DEFAULT_SONAR_SCANNER_IMAGE`)<br/>[![Trivy Badge](https://to-be-continuous.gitlab.io/doc/secu/trivy-badge-SONAR_SCANNER_IMAGE.svg)](https://to-be-continuous.gitlab.io/doc/secu/trivy-SONAR_SCANNER_IMAGE) |
| `host-url` / `SONAR_HOST_URL` | SonarQube server url            | _none_ (disabled) |
| `project-key` / `SONAR_PROJECT_KEY` | SonarQube Project Key (might also be set in the `sonar-project.properties` file) | fallbacks to `$CI_PROJECT_PATH_SLUG` (see below) |
| `project-name` / `SONAR_PROJECT_NAME` | SonarQube Project Name (might also be set in the `sonar-project.properties` file) | fallbacks to `$CI_PROJECT_PATH` (see below) |
+2 −1
Original line number Diff line number Diff line
@@ -9,7 +9,8 @@
    {
      "name": "SONAR_SCANNER_IMAGE",
      "description": "The Docker image used to run [sonar-scanner](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/sonarscanner/)",
      "default": "docker.io/sonarsource/sonar-scanner-cli:latest"
      "default": "docker.io/sonarsource/sonar-scanner-cli:latest",
      "has_default": true
    },
    {
      "name": "SONAR_HOST_URL",
+4 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ spec:
  inputs:
    scanner-image:
      description: The Docker image used to run [sonar-scanner](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/sonarscanner/)
      default: docker.io/sonarsource/sonar-scanner-cli:latest
      default: $TBC_DEFAULT_SONAR_SCANNER_IMAGE
    host-url:
      description: SonarQube server url
      default: ''
@@ -105,6 +105,9 @@ workflow:
    - when: on_success

variables:
  # Global defaults can be changed as instance or group variable
  TBC_DEFAULT_SONAR_SCANNER_IMAGE: docker.io/sonarsource/sonar-scanner-cli:latest

  # Sonar
  SONAR_SCANNER_IMAGE: $[[ inputs.scanner-image ]]
  SONAR_HOST_URL: $[[ inputs.host-url ]]