-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jenkinsfile
36 lines (33 loc) · 1.26 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
pipeline {
agent any
environment {
SERVER_IP = credentials('VIETTEL_IP_SERVER')
}
stages {
stage('Ssh and deploy') {
steps {
sshagent(['phu-cloud']) {
sh '''
ssh -o StrictHostKeyChecking=no -l phutx $SERVER_IP -p 22129 <<EOF
cd /home/orai/owallet
sudo git pull origin feat/refactor-theme
echo "DONE pull source code"
'''
}
sshagent(['phu-cloud']) {
sh '''
ssh -o StrictHostKeyChecking=no -l orai $SERVER_IP -p 22129 <<EOF
cd /home/orai/owallet
pm2 restart owallet
echo "DONE restart process owallet"
'''
}
}
}
}
post {
success {
discordSend description: 'Deployed owallet feat/refactor-theme', footer: '', image: '', link: '', result: '', thumbnail: '', title: '[owallet] [viettel]', webhookURL: 'https://discord.com/api/webhooks/987298208751427584/Nu2Bc6BS5llTmcZjT80q6lpUrzmgE0aA23B7-NmqTAvbMAeBZFNsiYaRMO3kv1cERCQj'
}
}
}