In my build and publish process I would like to create a parameter to send to Octopus which should define whether Octopus should run a step in the install process (in this case run a SQL job to restore databases in a test environment).I only wish to do this for this particular deploy, ie I don’t want users to be prompted when they deploy this release to other environments or when the release is later promoted.
Is this somehow possible using prompt variables or in any other way in Octopus?
Thanks for reaching out. You can only decide whether to run a step or not Before you start a deployment, and not after (which is what you want to do, based on the value of a variable). There’s a user voice suggestion for this that could really use some of your votes, so please try to drop by if you’d like to see this implemented: http://octopusdeploy.uservoice.com/forums/170787-general/suggestions/6594872-allow-the-run-condition-of-a-step-to-be-based-on-a
What you can do is trigger the release-create/deploy using
Octo.exe at the end of your build process while passing the
--skip parameter to skip a specific step.
More info about
Hope that helps,