dockerdeploymentaws-codepipelineaws-codebuildbuildspec

buildspec.yaml not found- AWS codebuild failed


Based on my search, this could happened only when buildspec.yaml file is not there in the root folder. But in my repo buildspec.yaml file is there in the root folder. while building the code using AWS CodeBuild, it is throwing the below image.

CODEBUILD_SRC_DIR=/codebuild/output/src
Phase complete: DOWNLOAD_SOURCE State: FAILED
Phase context status code: YAML_FILE_ERROR Message: stat /codebuild/output/src/buildspec.yml: no such file or directory

What could be the possible mistake I did? Is there any other reason it may create this error.?


Solution

  • change your name of buildspec.yaml to buildspec.yml in you code and try, it will pass the error of not finding the buildspec.yml file, othere things depend upon how you have setup the build.

    becasue you can clearly see in the error its searching for buildspec.yml not buildspec.yaml