-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.gitlab-ci.yml
59 lines (54 loc) · 1.03 KB
/
.gitlab-ci.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
.only-default: &only-default
only:
- api
- web
- master
stages:
- install
# - test
- build
- deploy
install:
<<: *only-default
stage: install
image: node
cache:
paths:
- node_modules/
artifacts:
paths:
- node_modules/
script:
- echo "Install project dependecies"
- npm install
- echo "Install successful"
# test:
# <<: *only-default
# stage: test
# image: node
# script:
# - echo "Testing App"
# - npm test
# - echo "Test successful"
# coverage: /All\sfiles.*?\s+(\d+.\d+)/
build:
<<: *only-default
stage: build
image: node
script:
- echo "Build started"
- REACT_APP_API_KEY=$REACT_APP_API_KEY REACT_APP_API_KEY_HASH=$REACT_APP_API_KEY_HASH REACT_APP_ENVIRONMENT=prod npm run build
- echo "Build successfull"
artifacts:
paths:
- build/
deploy:
<<: *only-default
stage: deploy
dependencies:
- build
image:
name: amazon/aws-cli
entrypoint: ['']
script:
- aws s3 cp build/ s3://$S3_BUCKET/ --recursive