-
Notifications
You must be signed in to change notification settings - Fork 4
/
bitbucket-pipelines.yml
68 lines (64 loc) · 1.64 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
61
62
63
64
65
66
67
68
image: node:20
definitions:
services:
docker:
memory: 3072
steps:
- step: &install
name: ⚙️ Install
script:
- npm ci
artifacts:
- node_modules/**
- step: &lint
name: 🧹 Lint
script:
- npm run lint
- npm run format
- npm run check-types
- step: &test
name: 🧪 Test
script:
- npm run test
- step: &push-serverless
name: 🚀 Deploy Service
script:
- pipe: docker://aligent/nx-serverless-deploy-pipe:20-alpine
variables:
AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY}
CFN_ROLE: ${CFN_ROLE}
STAGE: ${STAGE}
DEBUG: ${CI_DEBUG}
UPLOAD_BADGE: 'true'
APP_USERNAME: ${APP_USERNAME}
APP_PASSWORD: ${APP_PASSWORD}
pipelines:
pull-requests:
'**':
- step: *install
- parallel:
steps:
- step: *test
- step: *lint
branches:
production:
- stage:
name: 'Awaiting Production Deploy'
steps:
- step:
name: 'Awaiting Production Deploy'
script:
- echo "Awaiting manual trigger of production deploy"
- stage:
name: 'Deploy Production'
deployment: Production
trigger: manual
steps:
- step:
<<: *push-serverless
staging:
- step:
<<: *push-serverless
name: 'Deploy Staging'
deployment: Staging