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-13 08:50:38 +00:00
|
|
|
sshagent(['13e00839-0608-4e91-8b9e-cce3818425f3']) {
|
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
|
|
|
}
|
|
|
|
}
|