CodeBuild成功,但CodeDeploy失败

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

Codebuild成功完成,但CodeDeploy失败。检查错误消息,指出“操作失败,因为找不到工件或Amazon S3存储桶。”在检查了代码管道存储区之后,我在那里看到了输入工件,但没有看到输出工件。这是我用于buildspec.yml的代码:

version: 0.2
phases:
  pre_build:
    commands:
    - echo "Entered the pre-build phase"
  build:
    commands:
    - echo "Entered build phase"
    - mvn package
    - ls
    - (cd target && ls)
    - (cd target/ROOT && ls)
    
  post_build:
    commands:
    - echo "Entered the post-build phase"
    artifacts:
      files:
        - '**/*'
aws-codepipeline aws-codebuild
1个回答
0
投票

请按以下步骤纠正工件缩进:

version: 0.2
phases:
  pre_build:
    commands:
    - echo "Entered the pre-build phase"
  build:
    commands:
    - echo "Entered build phase"
    - mvn package
    - ls
    - (cd target && ls)
    - (cd target/ROOT && ls)

  post_build:
    commands:
    - echo "Entered the post-build phase"
artifacts:
  files:
    - '**/*'
© www.soinside.com 2019 - 2024. All rights reserved.