gpt4 book ai didi

amazon-web-services - AWS CodeBuild 无法使用 CD 命令

转载 作者:行者123 更新时间:2023-12-02 03:12:33 25 4
gpt4 key购买 nike

我在 CodeCommmit 中有一个非常简单的 Hello World Java 项目,其结构如下

This is a sample template for sam-app - Below is a brief explanation of what we have generated for you:

├── README.md <-- This instructions file
├── HelloWorldFunction <-- Source for HelloWorldFunction Lambda Function
│ ├── pom.xml <-- Java dependencies
│ └── src
│ ├── main
│ │ └── java
│ │ └── helloworld
│ │ ├── App.java <-- Lambda function code
│ │ └── GatewayResponse.java <-- POJO for API Gateway Responses object
│ └── test <-- Unit tests
│ └── java
│ └── helloworld
│ └── AppTest.java
└── template.yaml

我正在使用 CodeBuild,我的 buildspec.yml 看起来像

version: 0.1 

phases:
install:
commands:
- echo Nothing to do in the install phase...
pre_build:
commands:
- echo Nothing to do in the pre_build phase...
build:
commands:
- echo Build started on this `date`
- pwd
- ls
- cd ./HelloWorldFunction
- pwd
- mvn install
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- target/JavaWeb.war

但是 CodeBuild 运行的日志看起来像 aws 无法“更改目录”来更正子文件夹。不确定我是否遗漏了什么? enter image description here

最佳答案

请将构建规范更改为版本 0.2(从 0.1),这应该可以解决此问题。

关于amazon-web-services - AWS CodeBuild 无法使用 CD 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57210857/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com