-
Notifications
You must be signed in to change notification settings - Fork 6
/
Jenkinsfiles
52 lines (39 loc) · 1.2 KB
/
Jenkinsfiles
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
pipeline {
agent any
tools {nodejs "nodejs"}
stages {
stage("Build project"){
steps {
sh " rm -rf engineerprofile360.web"
sh "git clone https://github.com/workshopapps/engineerprofile360.web.git"
sh "ls"
dir('engineerprofile360.web/frontend') {
sh "npm install"
sh "CI=false npm run build"
}
}
}
stage("Deploy frontend"){
steps {
sh "sudo cp -fr ${WORKSPACE}/engineerprofile360.web/frontend/build/* /home/omiebi/eval360/frontend"
sh "sudo systemctl restart eval360_frontend.service"
}
}
stage("Deploy Backend"){
steps {
sh "sudo cp -fr ${WORKSPACE}/engineerprofile360.web/backend/* /home/omiebi/eval360/backend"
sh "sudo systemctl restart eval360.service"
sh "sudo rm -rf *"
}
}
}
post{
failure{
emailext attachLog: true,
to: '[email protected]',
subject: '${BUILD_TAG} Build failed',
body: '${BUILD_TAG} Build Failed \nMore Info can be found here: ${BUILD_URL} or in the log file below'
}
}
}
//testing auto deploy