Amazon Web Service CodeDeploy appspec.yml problems

前端 未结 2 1613
鱼传尺愫
鱼传尺愫 2020-12-25 15:27

I have a Node.js application which is being automatically deployed to Amazon Web Service through Codeship using the CodeDeploy AWS

相关标签:
2条回答
  • 2020-12-25 16:11

    The ApplicationStop hook is being called from the previously installed deployment before trying to run the current deployment appspec.yml file.

    In order to prevent this from happening you'll have to remove any previously installed deployment from the server.

    • Stop the code deploy agent - sudo service codedeploy-agent stop
    • clear all deployments under /opt/codedeploy-agent/deployment-root
    • Restart the code deploy agent - sudo service codedeploy-agent start
    0 讨论(0)
  • 2020-12-25 16:12

    There is another way documented in the AWS developer forums, which I think is preferable.

    Use the --ignore-application-stop-failures option with the CLI tool while doing the deployment, it worked perfectly for me.

    Example taken from the forum:

    aws deploy create-deployment --application-name APPLICATION --deployment-group-name GROUP --ignore-application-stop-failures --s3-location bundleType=tar,bucket=BUCKET,key=KEY --description "Ignore ApplicationStop failures due to broken script"
    

    https://forums.aws.amazon.com/thread.jspa?threadID=166904

    0 讨论(0)
提交回复
热议问题