Compare commits
2 Commits
281d300292
...
151384da99
| Author | SHA1 | Date | |
|---|---|---|---|
| 151384da99 | |||
| 72701be91d |
32
adminservice.Jenkinsfile
Normal file
32
adminservice.Jenkinsfile
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage('Clone') {
|
||||||
|
steps {
|
||||||
|
checkout scm
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Deploy') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
try {
|
||||||
|
sh 'docker compose up -d adminservice -- build'
|
||||||
|
} catch (Exception e) {
|
||||||
|
error "部署失败: ${e.message}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Health Check') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
sleep time: 30, unit: 'SECONDS'
|
||||||
|
sh 'docker ps | grep adminservice'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user