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:
- '**/*'
请按以下步骤纠正工件缩进:
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:
- '**/*'