Calling deployment script from command line

Hi,

I am looking to migrate an existing release/deployment process to octopus. Currently our release process is:
1)Do some manual steps
2)Run a Fake f# script (http://fsharp.github.io/FAKE/)
3)Do some manual checks.

We have around10 test environments, and 40 client environments.

it’s not feasible for us to migrate everything to octopus, so I’d like to start with a couple of the test boxes. Fake is just f# with it providing some functions for parameter passings, and some helper functions.

So in fake you’d do this for something variable:
let sqlInstance = getBuildParamOrDefault “sqlInstance” “localhost”

It seems the f# in octopus support for custom scripts in my package would work like:
let sqlInstance = Octopus.findVariableOrDefault “sqlInstance” “localhost”

So when running a release you’d get a command like and run:
fake.exe “deploy.fsx” sqlInstance=“mysqlInstance”

This doesn’t seem like a huge change for me to update the script to use the octopus way, but I would need some way to be able to run my script without octopus.

Is there any way I can run f# script with Octopus.findVariableOrDefault “sqlInstance” “localhost” in via the command line. i.e. if I have a copy of calamari somewhere on the box.

The other options I can see would be:
Have two scripts one for octopus and one for fake, which I think would be a bad idea as if someone fixes a bug in one, they’d have to remember to make the change to the other
Keep it using the fake way for doing things, and call fake.exe from octopus

Hi Ian,

Thanks for getting in touch! I fully agree that having 2 scripts is not a great solution and this why we recently added ability to pass parameters to scripts. In this way you can keep your scripts Octopus free.

Please let me know if this doesn’t solve your problem.

Pawel

Notice:

This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.