forked from mhlee21/mungtopia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh.back
executable file
·34 lines (24 loc) · 1001 Bytes
/
deploy.sh.back
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
#!/bin/sh
echo
echo "###### BUILD FRONTEND ######"
echo
echo ">> cd /jenkins/workspace/mungtopia/frontend/"
cd /jenkins/workspace/mungtopia/frontend/
echo ">> sudo rm -rf node_modules"
sudo rm -rf node_modules
echo ">> sudo npm i --save-exact"
sudo npm i --save-exact
echo ">> sudo npm run build"
sudo npm run build
echo
echo "###### FE DONE ######"
echo
echo "###### DEPLOY BACKEND ######"
echo
echo ">> sudo kill -9 `ps -ef | grep '/jenkins/workspace/mungtopia/backend/build/libs/mungtopia-0.0.1-SNAPSHOT.jar'|awk '{print $2}'`"
sudo kill -9 `ps -ef | grep '/jenkins/workspace/mungtopia/backend/build/libs/mungtopia-0.0.1-SNAPSHOT.jar'|awk '{print $2}'`
echo ">> nohup java -jar /jenkins/workspace/mungtopia/backend/build/libs/mungtopia-0.0.1-SNAPSHOT.jar > /dev/null 2>/jenkins/workspace/springboot.log &"
nohup java -jar /jenkins/workspace/mungtopia/backend/build/libs/mungtopia-0.0.1-SNAPSHOT.jar > /dev/null 2>/jenkins/workspace/springboot.log &
echo
echo "###### BE DONE ######"
echo