【发布时间】:2020-01-22 11:19:38
【问题描述】:
我正在尝试使用 AWS Codebuild 构建我的项目。下面是我的 buildspce.yml。我的源代码在 s3 存储桶中,文件类型是 zip。
version: 0.2
phases:
install:
runtime-versions:
java: openjdk8
commands:
- apt-get update -y
- apt-get install -y maven
pre_build:
commands:
- java -version
- mvn -version
# - command
build:
commands:
- echo Entered the build phase...
- echo Build started on `date`
- mvn package -Dmaven.test.failure.ignore=true
# - command
finally:
- echo This always runs even if the install command fails
#post_build:
#commands:
# - command
# - command
#reports:
#report-name-or-arn:
#files:
# - location
# - location
#base-directory: location
#discard-paths: yes
#file-format: JunitXml | CucumberJson
#artifacts:
#files:
# - location
# - location
#name: $(date +%Y-%m-%d)
#discard-paths: yes
#base-directory: location
#cache:
#paths:
# - paths
我在安装阶段遇到COMMAND_EXECUTION_ERROR: Error while executing command: apt-get install -y maven. Reason: exit status 100 错误。即使我从安装阶段删除了 maven 并且只添加了mvn package,那么exit code 1 也会出现错误。
【问题讨论】:
标签: aws-codepipeline aws-codebuild