Skip to content

Commit

Permalink
feat: add sonarqube properties
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelTshDev committed Mar 19, 2024
1 parent 1817b49 commit 24e184d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
31 changes: 27 additions & 4 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
image: tshio/awscli-docker-compose-pipelines:0.0.3

pipelines:
default:
- step:
definitions:
caches:
sonar: /opt/sonar-scanner/.sonar

steps:
- step: &sonarqube-analysis
name: SonarQube analysis
image: sonarsource/sonar-scanner-cli:latest
caches:
- sonar
script:
- sonar-scanner
- step: &build
name: Build
caches:
- node
- node
services:
- docker
deployment: test
script:
- npm run docker-build
- npm run lint
- docker-compose run -d --name js-container js
- docker exec js-container npm run services-units-coverage
- docker exec js-container npm run integration-tests
- docker cp js-container:/app/coverage .
- docker-compose stop js
- npm run units
artifacts:
- coverage/**

pipelines:
default:
- step: *build
- step: *sonarqube-analysis

custom:
create-staging:
Expand Down
11 changes: 11 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sonar.projectKey=boilerplate-express
sonar.projectName=express-boilerplate
sonar.organization=thesoftwarehouse
sonar.host.url=${env.SONAR_HOST_URL}
sonar.token=${env.SONAR_TOKEN}
sonar.exclusions=src/migrations/**
sonar.sources=src
sonar.tests=src
sonar.test.inclusions=**/*.spec.ts
sonar.sourceEncoding=UTF-8
sonar.javascript.lcov.reportPaths=coverage/unit/lcov.info,coverage/integration/lcov.info

0 comments on commit 24e184d

Please sign in to comment.