暂存提交
This commit is contained in:
Vendored
+12
@@ -66,6 +66,7 @@ pipeline {
|
||||
booleanParam(name: 'SERVICE_AUDIT', defaultValue: false, description: '审计服务(audit-service)')
|
||||
choice(name: 'ENVIRONMENT', choices: ['test', 'staging', 'production'], description: '部署环境')
|
||||
booleanParam(name: 'DEPLOY', defaultValue: false, description: '构建成功后是否部署')
|
||||
booleanParam(name: 'INITIALIZE_TEST_DATABASE', defaultValue: false, description: '仅 test:幂等初始化 IAM、订单、仓库与往来单位表结构及仓库样例数据')
|
||||
booleanParam(name: 'SKIP_TESTS', defaultValue: false, description: '是否跳过测试;生产构建不建议勾选')
|
||||
string(name: 'IMAGE_REPOSITORY', defaultValue: '8.163.30.128:10082/java-project/baiyue-firstleg', description: '预发布/生产镜像仓库地址;test 环境自动使用本机镜像,无需修改')
|
||||
string(name: 'DOCKER_BASE_IMAGE', defaultValue: 'docker.m.daocloud.io/library/eclipse-temurin:17-jre-alpine', description: 'Java 17 基础镜像;默认使用国内镜像代理')
|
||||
@@ -194,6 +195,17 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('测试数据库初始化(可选)') {
|
||||
when {
|
||||
allOf {
|
||||
expression { params.ENVIRONMENT == 'test' && params.INITIALIZE_TEST_DATABASE }
|
||||
}
|
||||
}
|
||||
steps {
|
||||
sh 'sh deploy/scripts/initialize-test-databases.sh'
|
||||
}
|
||||
}
|
||||
|
||||
stage('部署') {
|
||||
when {
|
||||
allOf {
|
||||
|
||||
Reference in New Issue
Block a user