Code pipeline build stage fail with node.js app

0

I have a node.js/express app I have deployed on elastic beanstalk. I've build and zipped the backend and successfully deployed the app manually. I would like to have Code pipeline get the source code on github, build the app and deploy to the current elastic beanstalk environment. I've written a buildspec.yml file and placed it in the root of my project. The root also contains the /backend and /frontend folders for the app. The build stage fails because it cannot find the .YAML file. When I put the build instructions directly into codebuild, the build starts but fails at npm run build. I've tested the build commands locally and they work. Here is what is currently in my buildspec.yml: version: 0.2 phases: pre_build: commands: - cd frontend - npm install build: commands: - npm run build - mv build ../backend/ - cd ../backend - npm install - npm shrinkwrap post_build: commands: - npm run buildpack

any suggestions?

devsax
gefragt vor 5 Monaten105 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen