I am getting the YAML error in buildspec.yaml
file. The error is:
[Container] 2021/11/09 06:18:34 Waiting for agent ping
[Container] 2021/11/09 06:18:35 Waiting for DOWNLOAD_SOURCE
[Container] 2021/11/09 06:18:40 Phase is DOWNLOAD_SOURCE
[Container] 2021/11/09 06:18:40 CODEBUILD_SRC_DIR=/codebuild/output/src909937249/src/git-codecommit.us-east-2.amazonaws.com/v1/repos/nftytest
[Container] 2021/11/09 06:18:40 YAML location is /codebuild/readonly/buildspec.yml
[Container] 2021/11/09 06:18:42 Phase complete: DOWNLOAD_SOURCE State: FAILED
[Container] 2021/11/09 06:18:42 Phase context status code: YAML_FILE_ERROR Message: Expected Variables to be of map type: found string instead at line 5, check indentation or content around the line num
My Buildspec looks like the following
version: 0.2
env:
variables:
CRYPTOGRAPHY_DONT_BUILD_RUST:"1"
phases:
install:
commands:
- yum install python3 -y
- python3 -m venv venv
- source venv/bin/activate
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- pip3 install -r requirements/local.txt
It gives on CRYPTOGRAPHY_DONT_BUILD_RUST:"1"
line.
There should be a space :
env:
variables:
CRYPTOGRAPHY_DONT_BUILD_RUST: "1"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.