diff --git a/README.md b/README.md index 9c8c85116d225da1993c981332de9e440bcd7c49..a41f6da0370ce9bf22bc1ef3337384bd9b47e4d4 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ It is bound to the `test` stage, and uses the following variables: | :lock: `SONAR_PASSWORD` | SonarQube password (depends on your authentication method) | _none_ | | `base-args` / `SONAR_BASE_ARGS` | SonarQube [analysis arguments](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) | `-Dsonar.links.homepage=${CI_PROJECT_URL} -Dsonar.links.ci=${CI_PROJECT_URL}/-/pipelines -Dsonar.links.issue=${CI_PROJECT_URL}/-/issues` | | `quality-gate-enabled` / `SONAR_QUALITY_GATE_ENABLED` | Set to `true` to enable SonarQube [Quality Gate](https://docs.sonarqube.org/latest/user-guide/quality-gates/) verification.<br/>_Uses `sonar.qualitygate.wait` parameter ([see doc](https://docs.sonarqube.org/latest/analysis/ci-integration-overview/#header-1))._ | _none_ (disabled) | +| `sonar-job-tags` / `SONAR_JOB_TAGS` | Tags to be used for selecting runners for the job | `[]` | ### Automatic Branch Analysis & Merge Request Analysis diff --git a/kicker.json b/kicker.json index 299472e6f2dbf7e2d21758d2267395acaab89d42..15b63004fd75e57fd7e9bd419fb6e4aeaa764dc1 100644 --- a/kicker.json +++ b/kicker.json @@ -52,6 +52,13 @@ "name": "SONAR_QUALITY_GATE_ENABLED", "description": "Enables SonarQube [Quality Gate](https://docs.sonarqube.org/latest/user-guide/quality-gates/) verification.\n\n_Uses `sonar.qualitygate.wait` parameter ([see doc](https://docs.sonarqube.org/latest/analysis/ci-integration-overview/#header-1))._", "type": "boolean" + }, + { + "name": "SONAR_JOB_TAGS", + "description": "Tags to be used for selecting runners for the job", + "type": "array", + "default": [], + "advanced": true } ], "variants": [ diff --git a/templates/gitlab-ci-sonar.yml b/templates/gitlab-ci-sonar.yml index e5faa4d7ab43f6773d2bc93848f367dcd16c99f6..32bd027feb27d88a28ede7718236b0a29d3f26a6 100644 --- a/templates/gitlab-ci-sonar.yml +++ b/templates/gitlab-ci-sonar.yml @@ -41,6 +41,9 @@ spec: _Uses `sonar.qualitygate.wait` parameter ([see doc](https://docs.sonarqube.org/latest/analysis/ci-integration-overview/#header-1))._ type: boolean default: false + sonar-job-tags: + description: tags to filter applicable runners for Sonar job + default: [] --- workflow: rules: @@ -437,4 +440,5 @@ sonar: $SONAR_BASE_ARGS rules: - !reference [.test-policy, rules] + tags: $[[ inputs.sonar-job-tags ]]