diff --git a/packages/core/pipeline/src/plugin/api.ts b/packages/core/pipeline/src/plugin/api.ts index 30f28c67..93d085ef 100644 --- a/packages/core/pipeline/src/plugin/api.ts +++ b/packages/core/pipeline/src/plugin/api.ts @@ -64,6 +64,7 @@ export type PluginDefine = Registrable & { }; }; needPlus?: boolean; + showRunStrategy?: boolean; }; export type ITaskPlugin = { diff --git a/packages/core/pipeline/src/plugin/decorator.ts b/packages/core/pipeline/src/plugin/decorator.ts index 442dbc2c..48024a19 100644 --- a/packages/core/pipeline/src/plugin/decorator.ts +++ b/packages/core/pipeline/src/plugin/decorator.ts @@ -48,11 +48,21 @@ export function IsTaskPlugin(define: PluginDefine): ClassDecorator { inputMap[item[0]] = item[1]; }); - merge(define, { input: inputMap, autowire: autowires, output: outputs }); + const defaultConfig = { + showRunStrategy: false, + default: { + strategy: { + runStrategy: 1, // 0:正常执行,1:成功后跳过 + }, + }, + }; + + define = merge(defaultConfig, define, { input: inputMap, autowire: autowires, output: outputs }); Reflect.defineMetadata(PLUGIN_CLASS_KEY, define, target); target.define = define; + pluginRegistry.register(define.name, { define, target, diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/custom/index.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/custom/index.ts index 27566afb..223467eb 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/custom/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/custom/index.ts @@ -9,9 +9,9 @@ export type { CertInfo }; @IsTaskPlugin({ name: "CertApplyUpload", icon: "ph:certificate", - title: "证书手动上传", + title: "商用证书托管", group: pluginGroups.cert.key, - desc: "在证书仓库手动上传后触发部署证书", + desc: "手动上传自定义证书后,自动部署(每次证书有更新,都需要手动上传一次)", default: { strategy: { runStrategy: RunStrategy.AlwaysRun, diff --git a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx index cf44c9ca..29bb0f80 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/pipeline/crud.tsx @@ -162,8 +162,9 @@ export default function ({ crudExpose, context: { certdFormRef, groupDictRef, se }, uploadCert: { order: 2, - text: "上传证书部署", + text: "商用证书托管", type: "primary", + title: "手动上传自有证书,执行自动部署(证书有更新时,都需要手动上传一次)", icon: "ion:cloud-upload-outline", click() { openUploadCreateDialog(); diff --git a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue index 88120b9d..247b5b73 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue +++ b/packages/ui/certd-client/src/views/certd/pipeline/pipeline/component/step-form/index.vue @@ -98,7 +98,7 @@ - +