2022-01-20 04:53:16 +00:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
2022-05-11 22:33:24 +00:00
|
|
|
stage ("install") {
|
|
|
|
steps {
|
2022-05-13 06:52:56 +00:00
|
|
|
nodejs("System NodeJS") {
|
2022-05-11 22:36:39 +00:00
|
|
|
sh "npm install"
|
|
|
|
}
|
2022-05-11 22:33:24 +00:00
|
|
|
}
|
|
|
|
}
|
2022-05-11 22:46:51 +00:00
|
|
|
stage ("test") {
|
|
|
|
steps {
|
2022-05-13 06:52:56 +00:00
|
|
|
nodejs("System NodeJS") {
|
2022-05-11 22:46:51 +00:00
|
|
|
sh "npm run test"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-20 04:53:16 +00:00
|
|
|
stage ("build") {
|
|
|
|
steps {
|
2022-05-13 06:52:56 +00:00
|
|
|
nodejs("System NodeJS") {
|
2022-01-20 04:53:16 +00:00
|
|
|
sh "npm run build"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-20 06:16:18 +00:00
|
|
|
stage ("deploy") {
|
|
|
|
when {
|
|
|
|
branch '**/master'
|
|
|
|
}
|
|
|
|
steps {
|
2022-05-12 04:50:49 +00:00
|
|
|
sshagent(['34337c34-a538-42c4-8caf-66161bbc8044']) {
|
2022-05-13 07:12:37 +00:00
|
|
|
sh "scp -o StrictHostKeyChecking=no -r dist/** www-data@sys.reslate.xyz:/srv/www/ent.sys.reslate.xyz"
|
2022-05-12 02:59:02 +00:00
|
|
|
}
|
2022-01-20 06:16:18 +00:00
|
|
|
}
|
|
|
|
}
|
2022-01-20 04:53:16 +00:00
|
|
|
}
|
|
|
|
}
|