-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJenkinsfile
More file actions
48 lines (35 loc) · 925 Bytes
/
Jenkinsfile
File metadata and controls
48 lines (35 loc) · 925 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
pipeline {
agent any
stages {
stage("Get repo"){
steps {
sh "rm -rf ${WORKSPACE}/dinnerwithfriends.api"
sh "git clone https://github.com/workshopapps/dinnerwithfriends.api.git"
}
}
stage("build backend"){
steps {
sh "sudo npm i --force"
sh "ls -la"
}
}
stage("deploy") {
steps {
sh "sudo cp -rf ${WORKSPACE}/dinnerwithfriends.api/ /home/johnoni/"
sh "sudo cp -r /home/johnoni/dinnerwithfriends_env/app.env /home/johnoni/dinnerwithfriends.api/.env"
sh "sudo systemctl restart nickstersz-backend.service"
}
}
stage("Performance test"){
steps{
echo 'Installing k6'
sh 'sudo chmod +x setup_k6.sh'
sh 'sudo ./setup_k6.sh'
echo 'Running K6 performance tests...'
sh 'ls -a'
sh "pwd"
sh 'k6 run Performance_Test_Catchupb.js'
}
}
}
}