Hello,
I’m trying to setup sonarcloud for one of our private projects on our Bitbucket Cloud.
Here some information:
-
ALM used (-)
-
CI system used (Bitbucket Cloud)
-
Scanner command used when applicable (-)
-
Languages of the repository (php, js )
-
Only if the SonarCloud project is public, the URL (-)
- And if you need help with pull request decoration, then the URL to the PR too
-
Error observed (wrap logs/code around with triple quotes ``` for proper formatting)
pipe: sonarsource/sonarcloud-scan:1.4.0
16m 36s
+ docker container run \
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan \
--workdir=$(pwd) \
--label=org.bitbucket.pipelines.system=true \
--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
--env=BITBUCKET_PROJECT_UUID="$BITBUCKET_PROJECT_UUID" \
--env=BITBUCKET_REPO_IS_PRIVATE="$BITBUCKET_REPO_IS_PRIVATE" \
--env=BITBUCKET_WORKSPACE="$BITBUCKET_WORKSPACE" \
--env=BITBUCKET_SSH_KEY_FILE="$BITBUCKET_SSH_KEY_FILE" \
--env=BITBUCKET_REPO_OWNER_UUID="$BITBUCKET_REPO_OWNER_UUID" \
--env=BITBUCKET_BRANCH="$BITBUCKET_BRANCH" \
--env=BITBUCKET_REPO_UUID="$BITBUCKET_REPO_UUID" \
--env=BITBUCKET_PROJECT_KEY="$BITBUCKET_PROJECT_KEY" \
--env=BITBUCKET_REPO_SLUG="$BITBUCKET_REPO_SLUG" \
--env=CI="$CI" \
--env=BITBUCKET_REPO_OWNER="$BITBUCKET_REPO_OWNER" \
--env=BITBUCKET_STEP_RUN_NUMBER="$BITBUCKET_STEP_RUN_NUMBER" \
--env=BITBUCKET_BUILD_NUMBER="$BITBUCKET_BUILD_NUMBER" \
--env=BITBUCKET_GIT_SSH_ORIGIN="$BITBUCKET_GIT_SSH_ORIGIN" \
--env=BITBUCKET_PIPELINE_UUID="$BITBUCKET_PIPELINE_UUID" \
--env=BITBUCKET_COMMIT="$BITBUCKET_COMMIT" \
--env=BITBUCKET_CLONE_DIR="$BITBUCKET_CLONE_DIR" \
--env=PIPELINES_JWT_TOKEN="$PIPELINES_JWT_TOKEN" \
--env=BITBUCKET_STEP_UUID="$BITBUCKET_STEP_UUID" \
--env=BITBUCKET_DOCKER_HOST_INTERNAL="$BITBUCKET_DOCKER_HOST_INTERNAL" \
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/sonarsource/sonarcloud-scan" \
--env=SONAR_TOKEN="${SONAR_TOKEN}" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
sonarsource/sonarcloud-scan:1.4.0
Interception cache generation... 7/7 [============================] 100% 40 secs 442.0 MiBUnable to find image 'sonarsource/sonarcloud-scan:1.4.0' locally
1.4.0: Pulling from sonarsource/sonarcloud-scan
743f2d6c1f65: Pulling fs layer
5c14188d0980: Pulling fs layer
84a54a21b0f2: Pulling fs layer
d9d1bc98b287: Pulling fs layer
c99e982badff: Pulling fs layer
50c6b4dfde57: Pulling fs layer
a561eaec2f8f: Pulling fs layer
ea88b09234a3: Pulling fs layer
83613aeae58d: Pulling fs layer
5d476eee175a: Pulling fs layer
3d3951d29cc9: Pulling fs layer
c99e982badff: Waiting
50c6b4dfde57: Waiting
a561eaec2f8f: Waiting
ea88b09234a3: Waiting
83613aeae58d: Waiting
5d476eee175a: Waiting
3d3951d29cc9: Waiting
5c14188d0980: Verifying Checksum
5c14188d0980: Download complete
84a54a21b0f2: Verifying Checksum
84a54a21b0f2: Download complete
743f2d6c1f65: Verifying Checksum
743f2d6c1f65: Download complete
d9d1bc98b287: Verifying Checksum
d9d1bc98b287: Download complete
c99e982badff: Download complete
ea88b09234a3: Verifying Checksum
ea88b09234a3: Download complete
a561eaec2f8f: Verifying Checksum
a561eaec2f8f: Download complete
5d476eee175a: Verifying Checksum
5d476eee175a: Download complete
50c6b4dfde57: Verifying Checksum
50c6b4dfde57: Download complete
3d3951d29cc9: Verifying Checksum
3d3951d29cc9: Download complete
83613aeae58d: Verifying Checksum
83613aeae58d: Download complete
743f2d6c1f65: Pull complete
5c14188d0980: Pull complete
84a54a21b0f2: Pull complete
d9d1bc98b287: Pull complete
c99e982badff: Pull complete
50c6b4dfde57: Pull complete
a561eaec2f8f: Pull complete
ea88b09234a3: Pull complete
83613aeae58d: Pull complete
5d476eee175a: Pull complete
3d3951d29cc9: Pull complete
Digest: sha256:8b3690666e34b17bbab84370e569151742f06f21575fbe05e5c066c160b7c968
Status: Downloaded newer image for sonarsource/sonarcloud-scan:1.4.0
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.6.2.2472
INFO: Java 11.0.3 Oracle Corporation (64-bit)
INFO: Linux 5.15.0-1020-aws amd64
INFO: Bitbucket Cloud Pipelines detected, no host variable set. Defaulting to sonarcloud.io.
INFO: User cache: /root/.sonar/cache
INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: Analyzing on SonarQube server 8.0.0.34156
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Load global settings
INFO: Load global settings (done) | time=638ms
INFO: Server id: 1BD809FA-AWHW8ct9-T_TB3XqouNu
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=586ms
INFO: Load/download plugins (done) | time=5140ms
INFO: Loaded core extensions: developer-scanner
INFO: Found an active CI vendor: 'Bitbucket Pipelines'
INFO: Detected project key 'risscstuttgart_cdlux' from 'Bitbucket Cloud Pipelines'
INFO: Detected organization key 'risscstuttgart' from 'Bitbucket Cloud Pipelines'
INFO: Load project settings for component key: 'risscstuttgart_cdlux'
INFO: Load project settings for component key: 'risscstuttgart_cdlux' (done) | time=610ms
INFO: Process project properties
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: risscstuttgart_cdlux
INFO: Base dir: /opt/atlassian/pipelines/agent/build
INFO: Working dir: /opt/atlassian/pipelines/agent/build/.scannerwork
INFO: Load project branches
INFO: Load project branches (done) | time=582ms
INFO: Check ALM binding of project 'risscstuttgart_cdlux'
INFO: Detected project binding: BOUND
INFO: Check ALM binding of project 'risscstuttgart_cdlux' (done) | time=553ms
INFO: Load project pull requests
INFO: Load project pull requests (done) | time=559ms
INFO: Load branch configuration
INFO: Detected analysis for branch 'master'
INFO: Auto-configuring branch master
INFO: Load branch configuration (done) | time=5ms
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=638ms
INFO: Load active rules
INFO: Load active rules (done) | time=5887ms
INFO: Organization key: risscstuttgart
INFO: Branch name: master, type: long-lived
INFO: Load project repositories
INFO: Load project repositories (done) | time=562ms
INFO: Indexing files...
INFO: Project configuration:
INFO: Excluded sources: **/build-wrapper-dump.json
INFO: 2915 files indexed... (last one was composer.json)
INFO: 2919 files indexed... (last one was package.json)
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/salsify/json-streaming-parser/phpunit' is ignored. It is a symbolic link targeting a file that does not exist.
INFO: 3015 files indexed... (last one was Gruntfile.js)
INFO: 3015 files indexed... (last one was Gruntfile.js)
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/jsonlint' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/cssmin' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/lessc' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/php-parse' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/sentry' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/n98-magerun2' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/composer' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/templatemap_generator.php' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/psysh' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/bin/validate-json' is ignored. It is a symbolic link targeting a file not located in project basedir.
INFO: 3015 files indexed... (last one was Gruntfile.js)
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-escaper/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-console/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-mvc/doc/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-i18n/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-serializer/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-form/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-db/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-uri/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-crypt/doc/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-inputfilter/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-log/doc/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-text/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-diactoros/doc/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-soap/doc/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-di/doc/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-loader/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-captcha/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-config/doc/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-http/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-filter/docs/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/zendframework/zend-code/doc/book/index.md' is ignored. It is a symbolic link targeting a file not located in project basedir.
WARN: File '/opt/atlassian/pipelines/agent/build/vendor/n98/magerun2/bin/compile-bash-autocompletion' is ignored. It is a symbolic link targeting a file not located in project basedir.
INFO: 3015 files indexed
INFO: 0 files ignored because of inclusion/exclusion patterns
INFO: 100761 files ignored because of scm ignore settings
INFO: Quality profile for css: Sonar way
INFO: Quality profile for js: Sonar way
INFO: Quality profile for json: Sonar way
INFO: Quality profile for php: Sonar way
INFO: Quality profile for web: Sonar way
INFO: Quality profile for xml: Sonar way
INFO: ------------- Run sensors on module risscstuttgart_cdlux
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=621ms
INFO: Sensor IaC CloudFormation Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC CloudFormation Sensor [iac] (done) | time=108ms
INFO: Sensor IaC Kubernetes Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Kubernetes Sensor [iac] (done) | time=116ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=10ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=87ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=5246ms
INFO: Sensor XML Sensor [xml]
INFO: 381 source files to be analyzed
INFO: 58/381 files analyzed, current file: app/code/WeltPixel/OwlCarouselSlider/etc/acl.xml
INFO: 59/381 files analyzed, current file: app/code/CDLux/DesignThemes/view/adminhtml/layout/designthemes_categories_edit.xml
INFO: 60/381 files analyzed, current file: app/code/Cart2Quote/Quotation/view/frontend/layout/quotation_email_proposal_items.xml
INFO: 60/381 files analyzed, current file: app/code/Cart2Quote/Quotation/view/frontend/layout/quotation_email_proposal_items.xml
INFO: 61/381 files analyzed, current file: app/code/Magezon/Core/etc/frontend/di.xml
INFO: 61/381 files analyzed, current file: app/code/Magezon/Core/etc/frontend/di.xml
INFO: 61/381 files analyzed, current file: app/code/Magezon/Core/etc/frontend/di.xml
INFO: 61/381 files analyzed, current file: app/code/Magezon/Core/etc/frontend/di.xml
INFO: 62/381 files analyzed, current file: app/code/Cart2Quote/Quotation/view/adminhtml/layout/quotation_quote_view_load_block_items.xml
INFO: 62/381 files analyzed, current file: app/code/Cart2Quote/Quotation/view/adminhtml/layout/quotation_quote_view_load_block_items.xml
INFO: 62/381 files analyzed, current file: app/code/Cart2Quote/Quotation/view/adminhtml/layout/quotation_quote_view_load_block_items.xml
INFO: 62/381 files analyzed, current file: app/code/Cart2Quote/Quotation/view/adminhtml/layout/quotation_quote_view_load_block_items.xml
INFO: 63/381 files analyzed, current file: app/code/Printformer/Quotation/etc/module.xml
INFO: 63/381 files analyzed, current file: app/code/Printformer/Quotation/etc/module.xml
INFO: 63/381 files analyzed, current file: app/code/Printformer/Quotation/etc/module.xml
INFO: 63/381 files analyzed, current file: app/code/Printformer/Quotation/etc/module.xml
INFO: 63/381 files analyzed, current file: app/code/Printformer/Quotation/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
INFO: 64/381 files analyzed, current file: app/code/CDLux/Cart2Quote/etc/module.xml
time="2022-10-28T14:23:18Z" level=error msg="error waiting for container: unexpected EOF"
- Steps to reproduce :
I simply followed the setup steps, and extended our bitbucket-pipelines.yml by this lines:
clone:
** depth: full # SonarCloud scanner needs the full history to assign issues properly**
and
- pipe: sonarsource/sonarcloud-scan:1.4.0
- pipe: sonarsource/sonarcloud-quality-gate:0.1.6
After that I merged the changes and startet the pipeline. But it runs very long and ends with the attached error above.
- Potential workaround (-)
Best Regards,
Tina