Global deploy.ps1 or have a tentacle deploy.ps1
We have created a deploy script that we use as standard on all of our projects. However we do have to include it in all of our projects. The only difference is the variables we pass to each project.
It would be great if deploy.ps1 could live on the tentacle and execute that if the project doesn't have one. Or possibly chain them, tentacle executes its deploy.ps1 (if one exists - maybe a project option to skip it), then execute the project level deploy.ps1 (if one exists).
This would save us time having to include it (ok its not a major headache but still you got to do it). So we could literally create a new visual studio project and its ready to go as far as deployment goes.

-
Wayne Brantley commented
I think OD could just allow 'shared scripts' on the server, much like the library of variables. Then allow us to use them. Or maybe just create a 'step template'....you can then create the step with an embedded script once...use it in all your processes..
-
Michael McDaniel commented
@Sean
Actually, we do both! The script in my previous comment should work in both cases.
-
Sean Rock commented
@Michael
Thats a good idea. One question, how do you call them? During the deploy step which looks for deploy.ps1, or a powershell script step after the deploy step?
Thanks
-
Michael McDaniel commented
We have a similar scenario. But we work around what you are suggesting by having those scripts (many in our case) in another project that is deployed to each server to a path that is specified in a library variable. (like #{Deploy-Scripts-Path}="c:\deployment\scripts") We then use that variable path in our other projects to call the scripts using:
$script = ($OctopusParameters["Deploy-Scripts-Path"] + "\script.ps1")
if (![System.IO.File]::Exists($script))
{
throw ("Script Not Found: $script`r`nPlease Verify that Deployment Scripts were deployed to: " + $OctopusParameters["Deploy-Scripts-Path"])
}
. $script