-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
31 lines (29 loc) · 889 Bytes
/
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
pipeline {
agent any
stages {
stage("start") {
steps {
echo "building started"
sh "sudo chown -R jenkins:jenkins /home/velectic/node_code/expy-jenkins"
sh "sudo rm -rf /home/velectic/node_code/expy-jenkins"
}
}
stage("Build") {
steps {
sh "sudo npm install"
sh "sudo npm run build"
}
}
stage("Deploy") {
steps {
sh "sudo cp -r ${WORKSPACE}/ /home/velectic/node_code/expy-jenkins/"
}
}
stage("Restart-services") {
steps {
sh "sudo systemctl restart expy-jenkins"
sh "sudo systemctl status expy-jenkins"
}
}
}
}