-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
48 lines (44 loc) · 1.58 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
image: node:10.15.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
steps:
- step: &jest-test-coverage-report
name: Run jest tests and get coverage report
caches:
- node
script:
- npm install
- npm run-script test:report
artifacts:
- test-report.xml
- coverage/lcov.info
- step: &build-test-sonarcloud
name: Build, test and analyze on SonarCloud
caches:
- node
- sonar
script: # Build your project and run
- cat coverage/lcov.info
- cat test-report.xml
- pipe: sonarsource/sonarcloud-scan:1.0.1
- step: &check-quality-gate-sonarcloud
name: Check the Quality Gate on SonarCloud
script:
- pipe: sonarsource/sonarcloud-quality-gate:0.1.3
services:
docker:
memory: 2048
pipelines:
branches:
'**':
#- step: *jest-test-coverage-report
#- step: *build-test-sonarcloud
#- step: *check-quality-gate-sonarcloud
pull-requests:
'**':
#- step: *jest-test-coverage-report
#- step: *build-test-sonarcloud
#- step: *check-quality-gate-sonarcloud