-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
58 lines (42 loc) · 1.27 KB
/
Jenkinsfile
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
pipeline {
agent any
stages {
stage("Get repo"){
steps {
sh "rm -rf ${WORKSPACE}/dinnerwithfriends.web"
sh "git clone https://github.com/workshopapps/dinnerwithfriends.web.git"
sh "sudo cp -r ${WORKSPACE}/dinnerwithfriends.web /home/johnoni/dinnerwithfriends.web"
}
}
stage("build frontend"){
steps {
sh "cd dinnerwithfriends.web"
sh "cd dinnerwithfriends.web && npm i --force && CI=false npm run build"
}
}
stage("deploy") {
steps {
sh "sudo cp -rf ${WORKSPACE}/dinnerwithfriends.web/build/* /home/johnoni/dinnerwithfriends.web/"
sh "sudo systemctl restart nickstersz.service"
// sh "sudo serve -s /home/johnoni/dinnerwithfriends.web/build -p 3999"
}
}
stage("Performance test"){
steps{
echo 'Installing k6'
echo 'Running K6 performance tests...'
sh 'ls -a'
sh "pwd"
sh 'k6 run Performance_Test_Catchupf.js'
}
}
}
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'
}
}
}