mirror of
https://github.com/certd/certd.git
synced 2026-04-25 05:07:25 +08:00
perf: 密钥备份
This commit is contained in:
@@ -307,10 +307,16 @@ export class Executor {
|
||||
//更新pipeline vars
|
||||
if (Object.keys(instance._result.pipelineVars).length > 0) {
|
||||
// 判断 pipelineVars 有值时更新
|
||||
const vars = this.pipelineContext.getObj("vars");
|
||||
const vars = await this.pipelineContext.getObj("vars");
|
||||
merge(vars, instance._result.pipelineVars);
|
||||
await this.pipelineContext.setObj("vars", vars);
|
||||
}
|
||||
if (Object.keys(instance._result.pipelinePrivateVars).length > 0) {
|
||||
// 判断 pipelineVars 有值时更新
|
||||
const vars = await this.pipelineContext.getObj("privateVars");
|
||||
merge(vars, instance._result.pipelinePrivateVars);
|
||||
await this.pipelineContext.setObj("privateVars", vars);
|
||||
}
|
||||
}
|
||||
|
||||
async notification(when: NotificationWhen, error?: any) {
|
||||
|
||||
@@ -60,6 +60,7 @@ export type TaskResult = {
|
||||
clearLastStatus?: boolean;
|
||||
files?: FileItem[];
|
||||
pipelineVars: Record<string, any>;
|
||||
pipelinePrivateVars?: Record<string, any>;
|
||||
};
|
||||
export type TaskInstanceContext = {
|
||||
//流水线定义
|
||||
@@ -97,7 +98,7 @@ export type TaskInstanceContext = {
|
||||
};
|
||||
|
||||
export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
||||
_result: TaskResult = { clearLastStatus: false, files: [], pipelineVars: {} };
|
||||
_result: TaskResult = { clearLastStatus: false, files: [], pipelineVars: {}, pipelinePrivateVars: {} };
|
||||
ctx!: TaskInstanceContext;
|
||||
logger!: ILogger;
|
||||
accessService!: IAccessService;
|
||||
|
||||
Reference in New Issue
Block a user