feat(ack): add project delivery workflow
This commit is contained in:
@@ -37,6 +37,11 @@
|
||||
"const": "docs/ack/knowledge.yaml",
|
||||
"description": "项目知识护栏库的唯一权威路径"
|
||||
},
|
||||
"deliveryFile": {
|
||||
"type": "string",
|
||||
"const": "docs/ack/delivery.yaml",
|
||||
"description": "可选项目交付契约的唯一权威路径"
|
||||
},
|
||||
"orchestration": {
|
||||
"$ref": "#/definitions/orchestration"
|
||||
}
|
||||
@@ -57,6 +62,10 @@
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/definitions/workerReceipt" }
|
||||
},
|
||||
"deliveryRuns": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/definitions/deliveryRun" }
|
||||
},
|
||||
"tasks": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/definitions/task" }
|
||||
@@ -128,6 +137,26 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"project": {
|
||||
"type": "object",
|
||||
"required": ["deliveryFile"],
|
||||
"properties": {
|
||||
"deliveryFile": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["project"]
|
||||
},
|
||||
"then": {
|
||||
"required": ["deliveryRuns"],
|
||||
"properties": {
|
||||
"deliveryRuns": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"definitions": {
|
||||
@@ -721,6 +750,165 @@
|
||||
"checkedAt": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"deliveryArtifactEvidence": {
|
||||
"type": "object",
|
||||
"required": ["id", "type", "reference"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,63}$" },
|
||||
"type": { "type": "string", "enum": ["deb", "oci-image", "file"] },
|
||||
"reference": { "type": "string", "minLength": 1 },
|
||||
"digest": {
|
||||
"type": ["string", "null"],
|
||||
"pattern": "^sha256:[0-9a-f]{64}$"
|
||||
}
|
||||
}
|
||||
},
|
||||
"deliveryDeploymentEvidence": {
|
||||
"type": "object",
|
||||
"required": ["environment", "result", "evidence"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"environment": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,63}$"
|
||||
},
|
||||
"result": {
|
||||
"type": "string",
|
||||
"enum": ["succeeded", "failed", "rolled_back"]
|
||||
},
|
||||
"evidence": { "type": "string", "minLength": 1 }
|
||||
}
|
||||
},
|
||||
"deliveryRun": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"profile",
|
||||
"taskIds",
|
||||
"status",
|
||||
"sourceRevision",
|
||||
"configRevision",
|
||||
"pullRequest",
|
||||
"artifacts",
|
||||
"deployments",
|
||||
"evidence",
|
||||
"updatedAt"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^DR-[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"
|
||||
},
|
||||
"profile": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9-]{0,63}$"
|
||||
},
|
||||
"taskIds": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"uniqueItems": true,
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"planned",
|
||||
"running",
|
||||
"blocked",
|
||||
"failed",
|
||||
"review_ready",
|
||||
"released",
|
||||
"skipped"
|
||||
]
|
||||
},
|
||||
"sourceRevision": {
|
||||
"type": ["string", "null"],
|
||||
"pattern": "^[0-9a-f]{7,64}$"
|
||||
},
|
||||
"configRevision": {
|
||||
"type": ["string", "null"],
|
||||
"pattern": "^[0-9a-f]{7,64}$"
|
||||
},
|
||||
"pullRequest": { "type": ["string", "null"] },
|
||||
"artifacts": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/definitions/deliveryArtifactEvidence" }
|
||||
},
|
||||
"deployments": {
|
||||
"type": "array",
|
||||
"items": { "$ref": "#/definitions/deliveryDeploymentEvidence" }
|
||||
},
|
||||
"evidence": {
|
||||
"type": "array",
|
||||
"items": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"updatedAt": { "type": "string", "minLength": 1 }
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"status": {
|
||||
"enum": [
|
||||
"planned",
|
||||
"running",
|
||||
"blocked",
|
||||
"failed",
|
||||
"review_ready",
|
||||
"released"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["status"]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"sourceRevision": { "type": "string" },
|
||||
"configRevision": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"status": {
|
||||
"enum": [
|
||||
"blocked",
|
||||
"failed",
|
||||
"review_ready",
|
||||
"released",
|
||||
"skipped"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": ["status"]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"evidence": { "minItems": 1 }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"status": { "enum": ["review_ready", "released"] }
|
||||
},
|
||||
"required": ["status"]
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"sourceRevision": { "type": "string" },
|
||||
"configRevision": { "type": "string" },
|
||||
"pullRequest": { "type": "string", "minLength": 1 },
|
||||
"evidence": { "minItems": 1 }
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"task": {
|
||||
"type": "object",
|
||||
"required": ["id", "title", "status"],
|
||||
|
||||
Reference in New Issue
Block a user