-
Notifications
You must be signed in to change notification settings - Fork 71
/
bitbucket-pipelines.yml
60 lines (55 loc) · 1.49 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
49
50
51
52
53
54
55
56
57
58
59
60
image: tshio/awscli-docker-compose-pipelines:0.0.3
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
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-coverage
- docker cp js-container:/coverage .
- docker-compose stop js
artifacts:
- coverage/**
pipelines:
default:
- step: *build
branches:
main:
- step: *build
- step: *sonarqube-analysis
custom:
create-staging:
- step:
name: create staging environment
deployment: staging
script:
- ./deploy/apprunner/scripts/create.sh
services:
- docker
deploy-staging:
- step:
name: build and push docker
deployment: staging
script:
- ./deploy/apprunner/scripts/release.sh
- ./deploy/apprunner/scripts/deploy.sh
- ./deploy/apprunner/scripts/check-deployed-commit.sh
services:
- docker