2023-05-09 02:16:49 +00:00
|
|
|
|
import { ConcurrencyStrategy, NextStrategy, Pipeline, RunStrategy } from "@certd/pipeline";
|
|
|
|
|
|
|
|
|
|
let idIndex = 0;
|
|
|
|
|
function generateId() {
|
|
|
|
|
idIndex++;
|
|
|
|
|
return idIndex + "";
|
|
|
|
|
}
|
|
|
|
|
export const pipeline: Pipeline = {
|
|
|
|
|
version: 1,
|
2023-05-09 06:11:01 +00:00
|
|
|
|
id: "huawei.test",
|
2023-05-09 02:16:49 +00:00
|
|
|
|
title: "华为管道测试",
|
|
|
|
|
userId: 1,
|
|
|
|
|
triggers: [],
|
|
|
|
|
stages: [
|
|
|
|
|
{
|
|
|
|
|
id: generateId(),
|
|
|
|
|
title: "证书申请阶段",
|
|
|
|
|
concurrency: ConcurrencyStrategy.Serial,
|
|
|
|
|
next: NextStrategy.AllSuccess,
|
|
|
|
|
tasks: [
|
|
|
|
|
{
|
|
|
|
|
id: generateId(),
|
|
|
|
|
title: "申请证书任务",
|
|
|
|
|
steps: [
|
|
|
|
|
{
|
|
|
|
|
id: generateId(),
|
|
|
|
|
title: "申请证书",
|
|
|
|
|
type: "CertApply",
|
|
|
|
|
input: {
|
2023-05-09 05:52:25 +00:00
|
|
|
|
domains: ["powerleader.chat", "*.powerleader.chat", "*.test.powerleader.chat", "*.ai.powerleader.chat"],
|
2023-05-09 02:16:49 +00:00
|
|
|
|
email: "xiaojunnuo@qq.com",
|
|
|
|
|
dnsProviderType: "huawei",
|
2023-05-09 05:52:25 +00:00
|
|
|
|
accessId: "333",
|
|
|
|
|
},
|
|
|
|
|
strategy: {
|
|
|
|
|
runStrategy: RunStrategy.SkipWhenSucceed,
|
2023-05-09 02:16:49 +00:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: generateId(),
|
|
|
|
|
title: "证书部署阶段",
|
|
|
|
|
concurrency: ConcurrencyStrategy.Serial,
|
|
|
|
|
next: NextStrategy.AllSuccess,
|
|
|
|
|
tasks: [
|
|
|
|
|
{
|
|
|
|
|
id: generateId(),
|
|
|
|
|
title: "测试输出参数任务",
|
|
|
|
|
steps: [
|
|
|
|
|
{
|
|
|
|
|
id: generateId(),
|
|
|
|
|
title: "输出参数(echo插件)",
|
|
|
|
|
type: "EchoPlugin",
|
|
|
|
|
input: {
|
|
|
|
|
cert: "cert",
|
|
|
|
|
},
|
|
|
|
|
strategy: {
|
|
|
|
|
runStrategy: RunStrategy.SkipWhenSucceed,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
};
|