-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathJenkinsfile
More file actions
58 lines (39 loc) · 947 Bytes
/
Jenkinsfile
File metadata and controls
58 lines (39 loc) · 947 Bytes
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
pipeline {
agent any
stages {
stage("Get repo"){
steps {
sh "rm -rf ${WORKSPACE}/avatarai.web"
sh "git clone https://github.com/workshopapps/avatarai.web.git"
}
}
stage("Build frontend"){
steps {
sh "echo $pwd 1"
dir ('avatarai.web/frontend') {
sh "echo $pwd 2"
sh "npm i"
sh "export NODE_ENV=production && npm run build"
}
}
}
stage("Move repo") {
steps {
sh "sudo rm -rf /home/de-marauder/avatarai.web"
sh "sudo cp -r ${WORKSPACE}/avatarai.web /home/de-marauder/"
}
}
stage("start frontend") {
steps {
sh "sudo systemctl stop zuvatar-frontend.service"
sh "sudo systemctl restart zuvatar-frontend.service"
}
}
stage("start backend") {
steps {
sh "sudo systemctl stop zuvatar-backend.service"
sh "sudo systemctl restart zuvatar-backend.service"
}
}
}
}