logandk / serverless-wsgi

Serverless plugin to deploy WSGI applications (Flask/Django/Pyramid etc.) and bundle Python packages
MIT License
493 stars 87 forks source link

Finalize Deploy Hook not working #254

Closed tnorlund-dsc closed 4 months ago

tnorlund-dsc commented 8 months ago

Trying to get something to run after a serverless deploy. Can't get it to work using the after:deploy:finalize tag. Is there something else I need to add to the "serverless.yml" file?

serverless.yml

...
custom:
  wsgi:
    app: app.app

  scriptHooks:
    after:deploy:finalize:
      - ECHO "Deployed at `date`"
...
nuc-ronniehyslop commented 8 months ago

@tnorlund-dsc are you using any particular plugins? Is it just the ECHO that's not working and where are you expecting the ECHO to go? On screen when deploy finishes or in cloudwatch logs? etc.

nuc-ronniehyslop commented 8 months ago

There is an article here: https://stackoverflow.com/questions/52525042/invoke-a-lambda-function-with-deployment-using-serverless-framework this uses the serverless-plugins-scripts plugin and has a slightly different syntax than what you posted above. It's not something I've done before though.