文档似乎已过时。我在使用管道模板创建管道时遇到了类似的问题。使用 Deck(UI) 可以正常工作,因为https://www.spinnaker.io/reference/pipeline/templates/#pipeline-json 中描述的管道 json 不起作用。
使用 UI 从管道模板创建管道后,我分析了有效负载并意识到文档缺少有效负载中的某些字段。下面给出的有效载荷对我来说很好。我也建议您通过浏览器中的 UI 分析有效负载并将其用作参考。
{
"schema": "v2",
"template": {
"artifactAccount": "front50ArtifactCredentials",
"reference": "spinnaker://k8s-bake-approve-deploy-s3-23-oct:latest",
"type": "front50/pipelineTemplate"
},
"application": "v2poc",
"name": "test-6",
"triggers": [],
"type": "templatedPipeline",
"stages": [],
"variables": {
"namespace": "default",
"docker_registry": "docker.io",
"k8s_account": "my-k8-account",
"helm_package_s3_object_path": "s3://spin-helm/node-1.0.0.tgz",
"helm_override_file_s3_object_path": "s3://spin-helm/values.yaml",
"docker_registry_org": "athakur",
"docker_repository": "athakur/node",
"hal_s3_account": "my-s3-account",
"hal_docker_registry_account": "my-docker-registry",
"docker_image_tag": "0.1.0",
"spinnaker_application": "v2poc"
},
"exclude": [],
"parameterConfig": [],
"notifications": []
}