Last active
April 7, 2020 12:53
-
-
Save manishprajapatidev/941670cff7ddb49a6b4709bb7702ee65 to your computer and use it in GitHub Desktop.
SonarCloud bitbucket-pipelines for Angular JS, React Js or other Framwork.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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