如何使用工件在AWS pipline中成功部署

问题描述 投票:0回答:1

[当我尝试使用pipleline部署项目时,有时我会失败。你能告诉我什么地方不对吗?

enter image description here

由于执行操作失败:

Action execution failed
ChangeSet [abc-changeset] does not exist (Service: AmazonCloudFormation; Status Code: 404; Error Code: ChangeSetNotFound; Request ID: f49ef4e7-6971-4ea1-9467-05c2213c7bc4)

然后按新闻重试问题将解决。您介意帮我解决这个问题吗?enter image description here

我的buildspec.yml如下:

version: 0.2
phases:
  install:
    runtime-versions:
      nodejs: 12
  pre_build:
    commands:
      - echo Install source NPM dependencies...
      - npm install
  build:
    commands:
      - export BUCKET=abc_bucket
      - echo copy file to S3 bucket...
      - aws s3 cp openapi.yml s3://abc_bucket/openapi.yml
      - echo packaging files by using cloudformation...
      - aws cloudformation package --template-file template.yml --s3-bucket $BUCKET --output-template-file outputtemplate.yml
artifacts:
  type: zip
  files:
    - template.yml
    - outputtemplate.yml
amazon-web-services artifacts aws-codecommit
1个回答
0
投票

您注意到的问题是,在创建阶段之间创建竞争条件的'部署'阶段,'创建或替换变更集'和'执行变更集'已被添加到同一动作组中。和执行。要解决此问题,请创建一个新的Action组并将“ execute-changeset”添加到该新Action组。

© www.soinside.com 2019 - 2024. All rights reserved.