-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
60 lines (57 loc) · 1.33 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
stages:
- build
- deploy
build-back:
stage: build
only :
- master
- develop
script :
# Java를 sdkman 으로 설치한 경우 JAVA_HOME 설정을 위해서만 필요
- source "/home/ubuntu/.sdkman/bin/sdkman-init.sh"
- cd $CI_PROJECT_DIR/backend
- chmod +x mvnw
- ./mvnw package
- cp target/*.jar ~/app1.jar
tags :
# !! tag 값이 동일하게 설정된 Runner만 파이프라인을 동작시킴
- i02prf6
build-front:
stage: build
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- frontend/node_modules
only :
- master
- develop
script :
# Node.js를 nvm 으로 설치한 경우만 필요
- source "/home/ubuntu/.nvm/nvm.sh"
- cd $CI_PROJECT_DIR/frontend
- yarn install
# - yarn test
- yarn build
- rm -rf ~/s03p13c207/frontend/dist
- cp -rf dist ~/s03p13c207/frontend/
tags :
- i02prf6
deploy-back:
stage: deploy
only :
- master
- develop
script :
- cd $HOME
- ~/restart_backend1.sh
tags :
- i02prf6
deploy-front:
stage: deploy
only :
- master
- develop
script :
- ls -al ~/s03p13c207/frontend/dist
tags :
- i02prf6