ci: 添加 Jenkins 部署管道
- 新增 Jenkins 配置文件 chuanqi_server_jenkins - 定义简单的部署管道,包括部署阶段和事后处理- 部署步骤为进入指定目录并执行 git pull 操作 - 事后处理包括成功和失败情况下的消息输出
This commit is contained in:
19
chuanqi_server_jenkins
Normal file
19
chuanqi_server_jenkins
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('部署') {
|
||||||
|
steps {
|
||||||
|
echo 'Deploying...'
|
||||||
|
sh "cd /home/cq/data&&git pull"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post{
|
||||||
|
success {
|
||||||
|
echo 'Deployment finished successfully.'
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
echo 'Deployment failed.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user