I'm following the instructions in
this article to deploy changes with Octopus server and powershell scripts.
I was previously able to do deployments using the built in components so the SQL Change Automation components are installed and working.
I was hoping that by going the powershell route the deployment may be faster.
I also followed
this article to install the components in powershell.
I confirmed I can run the cmdlets in my windows session. But whenever I try a deployment through Octopus I get the following error.
New-DatabaseReleaseArtifact : The term 'New-DatabaseReleaseArtifact' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Octopus\Applications\Testing\AcumenDB\2018.12.07.1222_7\Octopus.Action.CustomScripts.PreDeploy.ps1:16 char:1
+ New-DatabaseReleaseArtifact -Target $targetDatabase `
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-DatabaseReleaseArtifact:Str
ing) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CommandNotFoundException
I even tried installing the modules for all users:
Install-Module SqlChangeAutomation -Scope AllUsers -AcceptLicense -Force
I also tried running Octopus server with my same user account that I initially installed the modules initially via powershell...
How can I get these recognized in Octopus deploy?
I was previously able to do deployments using the built in components so the SQL Change Automation components are installed and working.
I was hoping that by going the powershell route the deployment may be faster.
I also followed this article to install the components in powershell.
I confirmed I can run the cmdlets in my windows session. But whenever I try a deployment through Octopus I get the following error.
I even tried installing the modules for all users:
Install-Module SqlChangeAutomation -Scope AllUsers -AcceptLicense -Force
I also tried running Octopus server with my same user account that I initially installed the modules initially via powershell...
How can I get these recognized in Octopus deploy?