I have a ReactJS project hooked up to bitbucket pipelines. Below is the pipelines yml file
image: node:12.18.3
clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly
definitions:
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
pipelines:
branches:
master:
- step:
size: 2x
name: Build and Deploy artifacts using SCP to Test environment
caches:
- node
- sonar
script:
#- npm install
#- npm run build:testing
- echo "copy files to test environment $(ls -la build/)"
- pipe: sonarsource/sonarcloud-scan:1.2.0
variables:
SONAR_SCANNER_OPTS: -Xmx2048m
SONAR_TOKEN: ${SONAR_TOKEN}
EXTRA_ARGS: -Dsonar.host.url=https://sonarcloud.io
# - pipe: sonarsource/sonarcloud-quality-gate:0.1.4
Sonarcloud is unable to analyze the JS files and I can’t figure out why. Below is the last trace from the pipelines log after which it complains of an out of memory error
INFO: Deploying custom rules bundle jar:file:/root/.sonar/cache/f2d4f3985cfdc8a536978941e81bc342/sonar-securityjsfrontend-plugin.jar!/js-vulnerabilities-rules-1.0.0.tgz to /opt/atlassian/pipelines/agent/build/.scannerwork/.sonartmp/eslint-bridge-bundle/package/custom-rules16697662169002208132
INFO: 698 source files to be analyzed
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
INFO: 0/698 files analyzed, current file: src/containers/settings/interaction/MatchingType.js
If anyone has come across a similar issue, any help would be much appreciated. Thanks.
Attached is the complete DEBUG logs from bitbucket pipelines.
pipelineLog-864.zip (936.3 KB)