mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore: 1
This commit is contained in:
@@ -96,14 +96,13 @@ export class Executor {
|
||||
runnable.runnableType = runnableType;
|
||||
this.runtime.start(runnable);
|
||||
await this.onChanged(this.runtime);
|
||||
|
||||
const lastNode = this.lastStatusMap.get(runnable.id);
|
||||
const lastResult = lastNode?.status?.status;
|
||||
if (runnable.strategy?.runStrategy === RunStrategy.SkipWhenSucceed) {
|
||||
//如果是成功后跳过策略
|
||||
const lastNode = this.lastStatusMap.get(runnable.id);
|
||||
const lastResult = lastNode?.status?.status;
|
||||
const lastInput = JSON.stringify(lastNode?.status?.input);
|
||||
let inputChanged = false;
|
||||
if (runnableType === "step") {
|
||||
const lastInput = JSON.stringify((lastNode as Step)?.input);
|
||||
const step = runnable as Step;
|
||||
const input = JSON.stringify(step.input);
|
||||
if (input != null && lastInput !== input) {
|
||||
@@ -271,7 +270,6 @@ export class Executor {
|
||||
// this.runtime.context[stepOutputKey] = instance[key];
|
||||
});
|
||||
step.status!.files = instance.getFiles();
|
||||
|
||||
//更新pipeline vars
|
||||
if (Object.keys(instance._result.pipelineVars).length > 0) {
|
||||
// 判断 pipelineVars 有值时更新
|
||||
|
||||
@@ -41,10 +41,8 @@ export class RunHistory {
|
||||
this._loggers[runnable.id] = buildLogger((text) => {
|
||||
this.logs[runnable.id].push(text);
|
||||
});
|
||||
const input = (runnable as Step).input;
|
||||
const status: HistoryResult = {
|
||||
output: {},
|
||||
input: _.cloneDeep(input),
|
||||
status: ResultType.start,
|
||||
startTime: now,
|
||||
result: ResultType.start,
|
||||
|
||||
@@ -118,7 +118,7 @@ export type HistoryResultGroup = {
|
||||
};
|
||||
};
|
||||
export type HistoryResult = {
|
||||
input: any;
|
||||
// input: any;
|
||||
output: any;
|
||||
files?: FileItem[];
|
||||
/**
|
||||
|
||||
@@ -66,8 +66,8 @@ async function spawn(opts: SpawnOption): Promise<string> {
|
||||
cmd = item;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
cmd = opts.cmd
|
||||
} else {
|
||||
cmd = opts.cmd;
|
||||
}
|
||||
log.info(`执行命令: ${cmd}`);
|
||||
let stdout = "";
|
||||
|
||||
Reference in New Issue
Block a user