0
votes

I'm using a tutorial to deploy a dacpac through OctoPack.

http://kwilson.me.uk/blog/deploy-a-database-project-dacpac-using-octopusdeploy-and-powershell/

I'm getting an error saying the following:

Exception calling "Deploy" with "5" argument(s): "DacInstance with the specified instance_id does not exist." At Deploy.ps1 + $d.Deploy <<<< ($dp, $dbName, $TRUE, $dacProfile.DeployOptions) + CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : DotNetMethodException

Has anyone else faced this issue? What's causing it? It says there's 5 arguments but I'm only counting 4, and none of them are instance_id.

1
The DacServices.Deploy method does indeed have 5 arguments, documented here. The 3rd, 4th, and 5th parameters have default values and are thus optional. The tutorial is omitting the last parameter cancellationToken, allowing it to take its default value of $null. - JamesQMurphy

1 Answers

0
votes

From experience I can tell that the Octopus Deploy Community Step Template SQL - Deploy DACPAC works very well. No need to write PowerShell scripts. Add this Step Template to Octopus, add it to your project, fill in the variables and off you go.