yxk_pc_mdh/Jenkinsfile

34 lines
806 B
Plaintext
Raw Permalink Normal View History

2025-08-28 16:17:40 +08:00
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building the Vue project...'
sh 'npm install'
sh 'npm run build'
}
}
stage('Test') {
steps {
echo 'Running tests...'
sh 'npm run test'
}
}
stage('Deploy') {
steps {
echo 'Deploying the project...'
sh 'scp -P 10222 -r gyhl/* root@36.139.25.238:/opt/data/standard/nginx/www'
// Optional: Restart Nginx if needed
// sh 'ssh -p 10222 root@36.139.25.238 "systemctl restart nginx"'
}
}
}
post {
always {
echo 'Pipeline completed.'
}
}
}