简体   繁体   中英

YAML_FILE_ERROR: YAML file does not exist

I'm working on to implement pipeline on AWS, but getting error YAML_FILE_ERROR: YAML file does not exist , I don't know why. I'm using github repo for mean stack project, entry file is docker-compose. Yml docker-compose. Yml .

thanks

AWS CodeBuild expects the buildspec.yml file to be at the top level. A common mistake people make is to zip the code folder, which does contain buildspec.yml at the top level, but when this zip file is extracted, it creates the code folder and puts the buildspec.yml inside that (the way it was locally), meaning buildspec.yml is now NOT at the top level.

The solution is: instead of zipping the code folder, go inside the code folder, select all the files, and then do a zip.

This is what Amazon says here :

Important

Do not include the (root directory name) directory, only the directories and files in the (root directory name) directory.

It's a quirky little thing that trips many people (including me).

Now Amazon has given an option to change the location of the buildspec.yml file or even change the yml file name.

In Developer Tool -> Build -> "Build Project" -> "Your project Name" -> "Build details" -> Buildspec -> "Buildspec name - optional"

This is the instruction by AWS for that setting:

If your buildspec file uses a different name or location, enter its path from the source root here (for example, buildspec-two.yml or configuration/buildspec.yml).

您可能缺少 buildspec.yaml 或 buildspec.yml 文件,另一种可能是您可能错误地命名了此文件。

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM