aws-codepipeline - CodeBuild 成功,但 CodeDeploy 失败
问题描述
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:
- '**/*'
推荐阅读
- reactjs - 当我更改我的 Redux 状态时,文本没有更新
- bash - Bash 按列中的字符位置排序
- intellij-idea - 为什么 JetBrains IDE(IntelliJ IDEA、WebStorm 等)找不到模块 node_modules/standardx/lib/options?
- java - NetworkInterface.getNetworkInterfaces() 在 android 模拟器返回 null
- javascript - 如何根据属性键对值进行唯一和求和
- python - 如何在python中自动命名pdf文件
- c++ - 使用 std::move 函数签名传递向量
- java - 在 RowMapper 中使用 BeanMapper?
- javascript - 将 jQuery 插件导入 React 组件?
- debugging - node_modules 中的断点