openwhisk-wskdeploy icon indicating copy to clipboard operation
openwhisk-wskdeploy copied to clipboard

add an option to specify preprocessing before creating an action

Open pritidesai opened this issue 7 years ago • 1 comments

There has been an ask to include some generic preprocessing shell commands to execute before creating an action. We can add an option in manifest YAML to include such commands for each action. Run these commands as is and based on its result (returns 0 or 1), continue creating an action.

@mrutkows @csantanapr please provide any specific use case if you have. Thanks

pritidesai avatar Oct 24 '18 21:10 pritidesai

Yes!! 👍 We should do both hooks.

Start with this very simple global top level hooks

  • predeploy
  • postdeploy

Some basic use case. In predeploy I want to run make build This will compiled my swift code and create my action zip archives that are already referenced in wskdeploy manifest In postdeploy I want to run make integration This will will run some integration tests like doing some curl commands against my swift webactions

This is analogous to npm lifecycle scripts preinstall and postinstall https://docs.npmjs.com/misc/scripts Or Apache Cordova hooks https://cordova.apache.org/docs/en/latest/guide/appdev/hooks/

csantanapr avatar Oct 24 '18 21:10 csantanapr