From eb32a46e5b53a5a341c6df06dc055f986b21c709 Mon Sep 17 00:00:00 2001 From: dengqichen Date: Fri, 6 Dec 2024 13:50:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=88=90workingDirectory?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V1.0.1__init_data.sql | 44 ++++++++++++------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/backend/src/main/resources/db/migration/V1.0.1__init_data.sql b/backend/src/main/resources/db/migration/V1.0.1__init_data.sql index cceeef48..a3aef1ef 100644 --- a/backend/src/main/resources/db/migration/V1.0.1__init_data.sql +++ b/backend/src/main/resources/db/migration/V1.0.1__init_data.sql @@ -319,11 +319,37 @@ true, NOW(), 'system', NOW(), 'system', 1, false), "maximum": 3600, "default": 300 }, - "workingDir": { + "workingDirectory": { "type": "string", "title": "工作目录", "description": "脚本执行的工作目录", "default": "/tmp" + }, + "retryTimes": { + "type": "number", + "title": "重试次数", + "minimum": 0, + "maximum": 10, + "default": 0 + }, + "retryInterval": { + "type": "number", + "title": "重试间隔(秒)", + "minimum": 1, + "maximum": 3600, + "default": 60 + }, + "environment": { + "type": "object", + "title": "环境变量", + "description": "脚本执行时的环境变量", + "additionalProperties": {"type": "string"} + }, + "successExitCode": { + "type": "number", + "title": "成功退出码", + "description": "脚本执行成功的退出码", + "default": 0 } } } @@ -347,25 +373,11 @@ true, NOW(), 'system', NOW(), 'system', 1, false), "title": "执行器", "enum": ["SHELL"], "enumNames": ["Shell脚本执行器"] - }, - "retryTimes": { - "type": "number", - "title": "重试次数", - "minimum": 0, - "maximum": 3, - "default": 0 - }, - "retryInterval": { - "type": "number", - "title": "重试间隔(秒)", - "minimum": 1, - "maximum": 300, - "default": 60 } }, "required": ["name", "executor"] }', -'{"name": "Shell脚本", "executor": "SHELL", "retryTimes": 0, "retryInterval": 60}', +'{"name": "Shell脚本", "executor": "SHELL"}', true, NOW(), 'system', NOW(), 'system', 1, false), -- 网关节点类型