serverless-wsgi icon indicating copy to clipboard operation
serverless-wsgi copied to clipboard

Finalize Deploy Hook not working

Open tnorlund-dsc opened this issue 1 year ago • 2 comments

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`"
...

tnorlund-dsc avatar Jan 03 '24 17:01 tnorlund-dsc

@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 avatar Jan 04 '24 09:01 nuc-ronniehyslop

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.

nuc-ronniehyslop avatar Jan 04 '24 09:01 nuc-ronniehyslop