-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbitbucket-pipelines.yml
More file actions
48 lines (47 loc) · 1.49 KB
/
bitbucket-pipelines.yml
File metadata and controls
48 lines (47 loc) · 1.49 KB
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:lts-alpine
definitions:
steps:
- step: &build_and_deploy_to_s3
name: Build and Deploy to S3
# Regular steps have 4096 MB of memory in total, large build steps (which you can define using size: 2x) have 8192 MB in total.
size: 2x
caches:
- node
script:
- echo $REACT_APP_API_URL
- yarn install
- CI=FALSE REACT_APP_API_URL=$REACT_APP_API_URL yarn build --verbose
- pipe: atlassian/aws-s3-deploy:0.3.8
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
S3_BUCKET: $S3_BUCKET
LOCAL_PATH: "build"
ACL: "private"
- pipe: atlassian/aws-cloudfront-invalidate:0.1.1
variables:
DISTRIBUTION_ID: $DISTRIBUTION_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
pipelines:
branches:
master:
- step:
<<: *build_and_deploy_to_s3
deployment: Production
staging:
- step:
<<: *build_and_deploy_to_s3
deployment: Staging
pull-requests:
"**":
- step:
name: "Lint"
caches:
- node
script:
- yarn install
#- yarn lint
# - yarn run test:integration