0
votes

I need to specify the path to the file with migrations script in Execute Sql Script step. This step run on Octopus Server, and file is inside the package.

I have a dotnet ef migrations script -i ... as a build step.
Produced sql file is copied to the directory where application is published to.
This directory is then pushed to Octopus package feed.

Documentation shows how to access package contents in pre- or post-deploy scripts, but that is probably not what I need because applying migrations is a separate step in deployment process.

1

1 Answers

1
votes

You could read the contents of the script into an output variable in a pre/post deployment script in the deployment step and then use that variable value as the script body in the SQL - Execute Script step.

Since this is a community step there is no way currently to specify that the script source is from a package.