mirror of https://github.com/certd/certd
perf: 并行任务名称改成添加任务,取消并行,可以在同一个阶段获取上一个task的输出
parent
77cc3c4a5c
commit
c5e58770d1
|
@ -23,6 +23,7 @@ export default {
|
|||
|
||||
const pipeline = inject("pipeline") as Ref<any>;
|
||||
const currentStageIndex = inject("currentStageIndex") as Ref<number>;
|
||||
const currentTaskIndex = inject("currentTaskIndex") as Ref<number>;
|
||||
const currentStepIndex = inject("currentStepIndex") as Ref<number>;
|
||||
const currentTask = inject("currentTask") as Ref<any>;
|
||||
|
||||
|
@ -32,6 +33,7 @@ export default {
|
|||
options.value = pluginGroups.getPreStepOutputOptions({
|
||||
pipeline: pipeline.value,
|
||||
currentStageIndex: currentStageIndex.value,
|
||||
currentTaskIndex: currentTaskIndex.value,
|
||||
currentStepIndex: currentStepIndex.value,
|
||||
currentTask: currentTask.value
|
||||
});
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
<a-tooltip>
|
||||
<a-button type="dashed" shape="round" @click="taskAdd(stage, index)">
|
||||
<fs-icon class="font-20" icon="ion:add-circle-outline"></fs-icon>
|
||||
并行任务
|
||||
添加任务
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
|
|
|
@ -75,10 +75,11 @@ export class PluginGroups {
|
|||
return this.map[name];
|
||||
}
|
||||
|
||||
getPreStepOutputOptions({ pipeline, currentStageIndex, currentStepIndex, currentTask }: any) {
|
||||
getPreStepOutputOptions({ pipeline, currentStageIndex, currentTaskIndex, currentStepIndex, currentTask }: any) {
|
||||
const steps = this.collectionPreStepOutputs({
|
||||
pipeline,
|
||||
currentStageIndex,
|
||||
currentTaskIndex,
|
||||
currentStepIndex,
|
||||
currentTask
|
||||
});
|
||||
|
@ -96,7 +97,7 @@ export class PluginGroups {
|
|||
return options;
|
||||
}
|
||||
|
||||
collectionPreStepOutputs({ pipeline, currentStageIndex, currentStepIndex, currentTask }: any) {
|
||||
collectionPreStepOutputs({ pipeline, currentStageIndex, currentTaskIndex, currentStepIndex, currentTask }: any) {
|
||||
const steps: any[] = [];
|
||||
// 开始放step
|
||||
for (let i = 0; i < currentStageIndex; i++) {
|
||||
|
@ -107,6 +108,14 @@ export class PluginGroups {
|
|||
}
|
||||
}
|
||||
}
|
||||
//当前阶段之前的task
|
||||
const currentStage = pipeline.stages[currentStageIndex];
|
||||
for (let i = 0; i < currentTaskIndex; i++) {
|
||||
const task = currentStage.tasks[i];
|
||||
for (const step of task.steps) {
|
||||
steps.push(step);
|
||||
}
|
||||
}
|
||||
//放当前任务下的step
|
||||
for (let i = 0; i < currentStepIndex; i++) {
|
||||
const step = currentTask.steps[i];
|
||||
|
|
Loading…
Reference in New Issue