Running a custom script using files in a package

trevor.elliott's Avatar

trevor.elliott

23 Dec, 2017 12:00 AM

I have a package with DLLs for my entity framework classes, as well as migrate.exe, so that I can run a powershell script at deploy time to migrate the target database.

It seems like my only option is to run a script that exists inside a package. However it doesn't really make sense for this script to exist in my package because that script couldn't be run locally, the necessary files are packaged together as part of the build process, and I need to use octopus variables and output parameters from previous steps.

Is there no way to access the contents of a package when running a custom script defined inside of octopus?

  1. Support Staff 1 Posted by Kenneth Bates on 03 Jan, 2018 03:44 AM

    Kenneth Bates's Avatar

    Hi Trevor,

    Thanks for getting in touch! Generally we'd recommend scripts to exist within your package so you can source control them. Though you can also embed your deployment scripts in your step itself. This would require you to enable the Custom deployment scripts feature in your step, where you can then define PreDeploy, Deploy and PostDeploy scripts. Our documentation outlines this feature nicely.
    https://octopus.com/docs/deploying-applications/custom-scripts#Cust...

    You can also run your script via a script step.

    Do any of these options help satisfy your requirements? Let me know how you go and if you have any further questions. :)

    Best regards,

    Kenny

  2. 2 Posted by martha on 12 Nov, 2018 04:24 PM

    martha's Avatar

    is it possible automate deployment in Octopus with ruby or Capistrano scripts any help that would be great !
    how can i break the script .
    cap ************:production deploy &
    cap *********:production deploy &
    cap *******:production deploy &
    cap ******:production deploy

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac