I was playing with CustomTargets.ps1 and events such as "BeforeUpdate/BeforeUpdate" and the rest. Quite smooth experience, great!
However, here are some ideas I thought of:
It turns out that SPSD runs pair "BeforeUpdate/AfterUpdate" for the "Update.bat" and "BeforeDeploy/AfterDeploy" for the "Deploy.bat". So, it is quite tricky to write/attach custom PS logic for "every deployment"
despite the deployment type (deploy/upgrade/retract).
For example, I utilize Hyper-V/SCVMM to manage test VMs. Before every upgrade/deployment, I need to revert those VMs to previous checkpoint/snapshot. Well, right now I could utilize BeforeUpdate/BeforeUpdate/BeforeDeploy/AfterDeploy events. However, a "more
global" event would be really cool option.
Another one thing has to do with "Checking System Preconditions". That check is run before any events. So, there is no chance (I can't see it right now) to run our own PS logic before "Checking System Preconditions". I suppose it is better
to run VM reverting before system check (I surely can turn it off, but ensuring "services for deployment SPTimer/SPAdmin" and so on is a cool thing! :)
Then, SCVMM snapins should be loaded within "Load Addins" step (as I try to follow SPDS way to do things). I see StartUp/LoadSharePointPS function, but no entry point to attach to.
Also, one more moment about $vars variable for events. Seems it hasn't been implemented yet. There is no way to stop/skip deployment process via $vars variable BeforeUpdate/BeforeDeploy action?
Finally, putting all that together:
- would be nice to have clear, clarified event flow for the current SPSD release
- would be really cool to have additional "global" events which don't depend on "Update/Deploy/Retract" flows
- would be just awesome to have events for steps such as "LoadAddins", "Checking System Preconditions" and "Warning up" (not sure about other steps yet )
- $vars variable is a good place to control the process flow to skip/stop whole deployment process. Would be nice to see the future's implementation and ideas around that.