-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
59 lines (55 loc) · 1.18 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
stages:
- test
- build
- deploy
lint-test-job:
image: "python:3-bullseye"
stage: test
script:
- pip install flake8
- flake8 letters_service
- flake8 users_service
user-service-test-job:
image: "python:3-bullseye"
stage: test
script:
- cd users_service
- pip install -r requirements.txt
- python -m pytest
letters-service-test-job:
image: "python:3-bullseye"
stage: test
script:
- cd letters_service
- pip install -r requirements.txt
- python -m pytest
build-front-end-job:
stage: build
image: "node:lts-bullseye"
needs:
- lint-test-job
variables:
PUBLIC_URL: "https://directrep.gitlab.io/direct-rep"
REACT_APP_LETTERS_API_HOST: "https://letters-service-u1pb.onrender.com"
REACT_APP_USERS_API_HOST: "https://users-service-57wg.onrender.com"
script:
- cd ghi
- npm install
- npm run build
- cp build/index.html build/404.html
artifacts:
paths:
- ghi/build/
pages:
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
dependencies:
- build-front-end-job
needs:
- build-front-end-job
script:
- mv ghi/build/ public
artifacts:
paths:
- public