36 lines
639 B
Groovy
36 lines
639 B
Groovy
pipeline {
|
|
agent any
|
|
stages {
|
|
stage ("install") {
|
|
steps {
|
|
nodejs("System") {
|
|
sh "npm install"
|
|
}
|
|
}
|
|
}
|
|
stage ("test") {
|
|
steps {
|
|
nodejs("System") {
|
|
sh "npm run test"
|
|
}
|
|
}
|
|
}
|
|
stage ("build") {
|
|
steps {
|
|
nodejs("System") {
|
|
sh "npm run build"
|
|
}
|
|
}
|
|
}
|
|
stage ("deploy") {
|
|
when {
|
|
branch '**/master'
|
|
}
|
|
steps {
|
|
sshagent(['34337c34-a538-42c4-8caf-66161bbc8044']) {
|
|
sh "scp -r dist/** www-data@sys.reslate.xyz:/srv/www/ent.sys.reslate.xyz"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |