2022-01-19 22:53:16 -06:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
stages {
|
2022-05-11 17:33:24 -05:00
|
|
|
stage ("install") {
|
|
|
|
steps {
|
2022-05-13 01:52:56 -05:00
|
|
|
nodejs("System NodeJS") {
|
2022-05-11 17:36:39 -05:00
|
|
|
sh "npm install"
|
|
|
|
}
|
2022-05-11 17:33:24 -05:00
|
|
|
}
|
|
|
|
}
|
2022-05-11 17:46:51 -05:00
|
|
|
stage ("test") {
|
|
|
|
steps {
|
2022-05-13 01:52:56 -05:00
|
|
|
nodejs("System NodeJS") {
|
2022-05-11 17:46:51 -05:00
|
|
|
sh "npm run test"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-19 22:53:16 -06:00
|
|
|
stage ("build") {
|
|
|
|
steps {
|
2022-05-13 01:52:56 -05:00
|
|
|
nodejs("System NodeJS") {
|
2022-01-19 22:53:16 -06:00
|
|
|
sh "npm run build"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-01-20 00:16:18 -06:00
|
|
|
stage ("deploy") {
|
|
|
|
when {
|
|
|
|
branch '**/master'
|
|
|
|
}
|
|
|
|
steps {
|
2022-05-13 03:50:38 -05:00
|
|
|
sshagent(['13e00839-0608-4e91-8b9e-cce3818425f3']) {
|
2022-05-13 02:12:37 -05:00
|
|
|
sh "scp -o StrictHostKeyChecking=no -r dist/** www-data@sys.reslate.xyz:/srv/www/ent.sys.reslate.xyz"
|
2022-05-11 21:59:02 -05:00
|
|
|
}
|
2022-01-20 00:16:18 -06:00
|
|
|
}
|
|
|
|
}
|
2022-01-19 22:53:16 -06:00
|
|
|
}
|
|
|
|
}
|