2019-07-02 16:29:52 +08:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
node {
|
|
|
|
label 'master'
|
|
|
|
}
|
|
|
|
}
|
2020-09-28 18:27:57 +08:00
|
|
|
|
2019-07-02 16:29:52 +08:00
|
|
|
stages {
|
|
|
|
stage('Package') {
|
|
|
|
tools {
|
|
|
|
nodejs 'nodejs-10'
|
|
|
|
}
|
|
|
|
steps {
|
2020-09-25 19:03:58 +08:00
|
|
|
sh 'npm update'
|
2019-07-02 16:29:52 +08:00
|
|
|
sh 'npm install'
|
|
|
|
sh 'npm run build'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Publish') {
|
|
|
|
steps {
|
2020-09-28 18:27:57 +08:00
|
|
|
sh 'mkdir -p /usr/local/joylink/jlclient'
|
|
|
|
sh 'rm -rf /usr/local/joylink/jlclient/*'
|
2019-07-02 16:29:52 +08:00
|
|
|
sh 'cp -rf ./dist/* /usr/local/joylink/jlclient'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|