-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
48 lines (40 loc) · 1.12 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
pipeline {
agent any
stages {
stage("Build Backend"){
steps {
sh " rm -rf pictureminer.api"
sh "git clone https://github.com/workshopapps/pictureminer.api.git"
dir('pictureminer.api') {
sh "go build"
}
}
}
stage("Deploy Backend"){
steps {
sh "sudo su - javi && whoami"
sh "sudo cp -fr ${WORKSPACE}/pictureminer.api/* /home/javi/backend/"
sh "sudo systemctl restart discripto_api.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_Discriptob.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'
}
}
}