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
demandé il y a 5 mois105 vues
Aucune réponse

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions