forked from humarkx/owallet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
42 lines (39 loc) · 1.58 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
pipeline {
agent any
environment {
SERVER_IP = credentials('DO_SENTRY2')
PROD_NAME = "prod_${env.BUILD_ID}.zip"
}
stages {
stage('Ssh and deploy') {
steps {
sshagent(['phu-cloud']) {
sh '''
ssh -o StrictHostKeyChecking=no -l root $SERVER_IP <<EOF
cd /mnt/volume_nyc3_03/owallet
git pull origin feat/extension-update
echo "DONE pull source code"
'''
}
sshagent(['phu-cloud']) {
sh '''
ssh -o StrictHostKeyChecking=no -l root $SERVER_IP <<EOF
cd /mnt/volume_nyc3_03/owallet
yarn
yarn build:libs
yarn
cd packages/extension
yarn build
echo "DONE build artifact"
zip -r /mnt/volume_nyc3_03/oraiscan-backend/static/$PROD_NAME prod/
'''
}
}
}
}
post {
success {
discordSend description: "Donwload new extension in url: https://do2.scan.orai.io/${env.PROD_NAME}", footer: '', image: '', link: '', result: '', thumbnail: '', title: '[oraichain-extension] [do-sentry2]', webhookURL: 'https://discord.com/api/webhooks/958201849419288638/tiTEM6ekc4pnhbTlaKlNDws1duDcTIRyWp-Yr8dcRXywt9PdqSY0PEWt7TkunkGk1SmV'
}
}
}