我有一条《守则》管道,利用欧盟S蓝色/绿色部署行动,向欧洲安全委员会的一个分组部署一个欧洲安全委员会的形象。 管道有两种来源:一种是使用AWS ECR行动的ECR图像,另一种是利用第三维吉布行动从Github调取图像。 环保委员会的行动产出如下:image
artifact,而Github行动产出为config
artifact。 这两部手工艺品都作为对欧共体蓝色部署/绿色部署行动的投入提供。
该管道在ECS蓝色部署/绿色部署行动中失败,有以下错误(从AWS console可见):
www.un.org/Depts/DGACM/index_spanish.htm 无效行动组合
Exception while trying to read the task definition artifact file from: config
这里是管道结构(有些细节为匿名而编辑):
$ aws codepipeline get-pipeline --name my-codepipeline
{
"pipeline": {
"name": "my-codepipeline",
"roleArn": "arn:aws:iam::123456789000:role/my-codepipeline-role",
"artifactStore": {
"type": "S3",
"location": "my-codepipeline-s3"
},
"stages": [
{
"name": "Source",
"actions": [
{
"name": "ImageSource",
"actionTypeId": {
"category": "Source",
"owner": "AWS",
"provider": "ECR",
"version": "1"
},
"runOrder": 1,
"configuration": {
"ImageTag": "latest",
"RepositoryName": "my-ecr"
},
"outputArtifacts": [
{
"name": "image"
}
],
"inputArtifacts": []
},
{
"name": "ConfigSource",
"actionTypeId": {
"category": "Source",
"owner": "ThirdParty",
"provider": "GitHub",
"version": "1"
},
"runOrder": 1,
"configuration": {
"Branch": "master",
"OAuthToken": "****",
"Owner": "me",
"PollForSourceChanges": "false",
"Repo": "application-config"
},
"outputArtifacts": [
{
"name": "config"
}
],
"inputArtifacts": []
}
]
},
{
"name": "Deploy",
"actions": [
{
"name": "DeployBackend",
"actionTypeId": {
"category": "Deploy",
"owner": "AWS",
"provider": "CodeDeployToECS",
"version": "1"
},
"runOrder": 1,
"configuration": {
"AppSpecTemplateArtifact": "config",
"AppSpecTemplatePath": "production/appspec.yaml",
"ApplicationName": "my-codedeploy",
"DeploymentGroupName": "my-codedeploy-group",
"Image1ArtifactName": "image",
"Image1ContainerName": "IMAGE_NAME",
"TaskDefinitionTemplateArtifact": "config",
"TaskDefinitionTemplatePath": "production/taskdef.json"
},
"outputArtifacts": [],
"inputArtifacts": [
{
"name": "image"
},
{
"name": "config"
}
]
}
]
}
],
"version": 1
},
"metadata": {
"pipelineArn": "arn:aws:codepipeline:ap-northeast-1:123456789000:my-codepipeline",
"created": 1564107543.285,
"updated": 1564107543.285
}
}
我检查了S3号压缩手法,其中肯定载有Github存放处的配置文件,地址是AppSpecTemplatePath
和。
此处为<编码>应用光谱>。
$ cat production/appspec.yaml
version: 0.0
Resources:
- TargetService:
Type: AWS::ECS::Service
Properties:
TaskDefinition: <TASK_DEFINITION>
LoadBalancerInfo:
ContainerName: "my-container"
ContainerPort: 80