1
Some checks failed
CI / verify (push) Has been cancelled

This commit is contained in:
2026-04-30 00:51:44 +08:00
parent 3bfaa303cb
commit 805d6f8cae
5 changed files with 24 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ pipeline {
string(name: 'AGENT_LABEL', defaultValue: 'built-in', description: '构建节点标签')
string(name: 'GENARRATIVE_WORKSPACE_ROOT', defaultValue: '', description: '源码根目录,留空则使用当前 Jenkins 工作区')
string(name: 'BUILD_VERSION', defaultValue: '', description: '发布版本号,留空则使用 Jenkins BUILD_NUMBER')
string(name: 'DATABASE', defaultValue: 'genarrative_pipeline_local_test', description: '发布包默认 SpacetimeDB database')
string(name: 'DATABASE', defaultValue: 'genarrative-pipeline-local-test', description: '发布包默认 SpacetimeDB database')
string(name: 'API_PORT', defaultValue: '8082', description: '发布包内 api-server 端口')
string(name: 'WEB_PORT', defaultValue: '25001', description: '发布包内静态网站端口,默认 25001')
string(name: 'SPACETIME_PORT', defaultValue: '3101', description: '发布包内本地 SpacetimeDB 端口')
@@ -39,8 +39,8 @@ pipeline {
if (!database) {
error('DATABASE 不能为空。')
}
if (!(database ==~ /^[0-9A-Za-z._-]+$/)) {
error("DATABASE 只能包含数字、字母、点、下划线和短横线,当前值: ${database}")
if (!(database ==~ /^[0-9A-Za-z.-]+$/)) {
error("DATABASE 只能包含数字、字母、点和短横线,不能包含下划线,当前值: ${database}")
}
env.EFFECTIVE_DATABASE = database
def apiPort = params.API_PORT?.trim()