Our GitLab CI suggested configuration should mention that it requires a GitLab runner with a docker executor

Description

CONTEXT

Our GitLab CI suggested configuration provides a yaml that runs a SonarQube analysis through a docker image. Multiple users have reported that they get an error in GitLab during the sonarqube-check and the root cause is that the GitLab runner does not implement a docker executor.

Example: https://community.sonarsource.com/t/bash-line-120-sonar-scanner-command-not-found/102621

To give a bit more context on why this issue appears only to some of our users, In the cloud GitLab version GitLab offers runners that support docker executors by default, which means that possibly the majority of the users won’t experience any issue if they don’t touch the GitLab runners configuration.
In the on-prem version though, or the cloud version which the group is managed by the user’s organization, the runners can be restricted. If no runners that support docker executors are present then:

  • If the runner is not allowed to run untagged jobs, GitLab will show an error message before the ci starts, informing the user that no runner is available for the job.

  • If the runner is allowed to run untagged jobs, it will try to run the yaml CI script, ignoring the docker image, which will inevitably fail with the message “sonar-scanner: command not found

WHAT

Our GitLab project onboarding and documentation should mention that the suggested yaml configuration requires a runner that implements a docker executor. Optionally we could have a link to the GitLab executor documentation.

Activity

Show:
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Edition

Community

Fix versions

Priority

Sentry

Created November 29, 2023 at 3:27 PM
Updated March 20, 2025 at 8:55 AM

Flag notifications