首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >AWS CodeBuild无法使用CD命令

AWS CodeBuild无法使用CD命令
EN

Stack Overflow用户
提问于 2019-07-25 22:25:33
回答 1查看 1.1K关注 0票数 2

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

代码语言:javascript
复制
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看起来就像

代码语言:javascript
复制
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无法“更改目录”来更正子文件夹。不知道我是不是错过了什么??

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-26 02:14:47

请将buildspec更改为版本0.2 (从0.1),这将修复此问题。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57210857

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档