Skip to content

Instantly share code, notes, and snippets.

@manishprajapatidev
Last active April 7, 2020 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manishprajapatidev/941670cff7ddb49a6b4709bb7702ee65 to your computer and use it in GitHub Desktop.
Save manishprajapatidev/941670cff7ddb49a6b4709bb7702ee65 to your computer and use it in GitHub Desktop.
SonarCloud bitbucket-pipelines for Angular JS, React Js or other Framwork.
image: feeni/node-chrome:latest
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
services:
docker:
memory: 2048 #For large file line code
steps:
- step: &build-test-sonarcloud
name: Build, test and analyze on SonarCloud
caches:
- node
- sonar
script:
- cd ./src # If your project code and package.json inside src
- npm install --quiet
- npm run test -- --code-coverage --no-watch --no-progress --browsers=ChromeHeadlessNoSandbox
- pipe: sonarsource/sonarcloud-scan:1.0.1
pipelines:
default:
- step: *build-test-sonarcloud
pull-requests:
'**':
- step: *build-test-sonarcloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment