This commit is contained in:
xiaojunnuo
2025-07-22 12:22:54 +08:00
parent 13dfca1749
commit b0f91f1eea
5 changed files with 46 additions and 43 deletions

View File

@@ -352,6 +352,7 @@ export class Executor {
pipeline: this.pipeline,
runtime: this.runtime,
step,
define: cloneDeep(define),
lastStatus,
http,
download,

View File

@@ -86,6 +86,7 @@ export type TaskInstanceContext = {
runtime: RunHistory;
//步骤定义
step: Step;
define: PluginDefine;
//日志
logger: ILogger;
//当前步骤输入参数跟上一次执行比较是否有变化
@@ -164,9 +165,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
this.registerSecret(cert.one);
}
debugger
// @ts-ignore
if (this.ctx.step.onlyAdmin) {
if (this.ctx.define.onlyAdmin) {
if (!this.isAdmin()) {
throw new Error("只有管理员才能运行此任务");
}