-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
91 lines (79 loc) · 1.76 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
variables:
# custom runner for group 9 team project
GITLAB_RUNNER: "group_nine_runner"
#for frontend
CI: "false"
image: maven:latest
stages:
- test-backend
- build-backend
- deploy-backend
- build-frontend
- deploy-frontend
test-backend:
stage: test-backend
# tags:
# - group_nine_runner
script:
- cd Backend
- mvn clean test
# this will clean the target folder and then test the maven
only:
- main
build-backend:
stage: build-backend
# tags:
# - group_nine_runner
script:
- cd Backend
- mvn package
artifacts:
paths:
- Backend/target/*.jar
only:
- main
# deployed on render with base url https://group09-prod.onrender.
deploy-backend:
stage: deploy-backend
# tags:
# - group_nine_runner
script:
- echo "Deploy to prod server on render"
- curl -s "$RENDER_TRIGGER_URL_PROD_ENV"
only:
- prod
# deployed on render with base url https://group09.onrender.com
deploy-backend:
stage: deploy-backend
# tags:
# - group_nine_runner
script:
- echo "Deploy to prod server on render"
- curl -s "$RENDER_TRIGGER_URL_TEST_ENV"
only:
- main
#frontend - db
build-frontend:
stage: build-frontend
image: node:latest
script:
- cd Frontend
- echo "Building frontend"
artifacts:
paths:
- Frontend/build
only:
- main
deploy-frontend:
stage: deploy-frontend
image: node:latest
script:
- cd Frontend
- echo "REACT_APP_BASE_URL=https://culturenet-apis.netlify.app/.netlify/functions/api" >> ".env"
- npm install @fortawesome/fontawesome-svg-core
- npm install --legacy-peer-deps
- npm install netlify-cli -g
- npm run build
- netlify deploy --dir "build" --auth $AUTH_TOKEN --site $SITE_ID_PROD --prod
only:
- main