How can we help you today? How can we help you today?
Nestea

Activity overview

Latest activity by Nestea

Hello, Guys.   I found this issue and I think it's related to my case.  But only difference is I'm using Octopus deploy.  Is there any documentation on how to implement this kind of setup in Octopus deploy?  Hope to hear from you soon!  Btw, here's the error I got after shifting to AAD auth.  Sqlcmd:  invalid argument "DeployPath=D:\\Octopus Deploy Tentacle\\Applications\\ClientName\\QA\\ClientNameDB\\1.1.3424_3\\db\\project\\bin\\Debug\" ForceDeployWithoutBaseline=False DefaultFilePrefix=Database DefaultDataPath=\"" for "-v, --variables" flag: parse error on line 1, column 96: bare " in non-quoted-field  April 2nd 2024 15:41:35Error NotSpecified: A deployment error occurred: sqlcmd.exe exited with a non-zero exit code.   April 2nd 2024 15:41:35Error At [image] \Octopus Deploy Tentacle\Work\20240402074132-2344151-170\Script.ps1:23 char:5  April 2nd 2024 15:41:35Error +     &"$OutputPath\db\project\bin\Debug\Database_DeployPackage.ps1"  April 2nd 2024 15:41:35Error +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  April 2nd 2024 15:41:35Error at <ScriptBlock>, [image] \Octopus Deploy Tentacle\Applications\ClientName\QA\ClientNameDB\1.1.3424_3\db\project\bin\Debug\Database_DeployPackage.ps1: line 234  April 2nd 2024 15:41:35Error at <ScriptBlock>, [image] \Octopus Deploy Tentacle\Work\20240402074132-2344151-170\Script.ps1: line 23  April 2nd 2024 15:41:35Error at <ScriptBlock>, [image] \Octopus Deploy Tentacle\Work\20240402074132-2344151-170\Script.ps1: line 13  April 2nd 2024 15:41:35Error at <ScriptBlock>, [image] \Octopus Deploy Tentacle\Work\20240402074132-2344151-170\Bootstrap.Script.ps1: line 2050  April 2nd 2024 15:41:35Error at <ScriptBlock>, <No file>: line 1  April 2nd 2024 15:41:35Error at <ScriptBlock>, <No file>: line 1  April 2nd 2024 15:41:35Fatal The remote script failed with exit code 1  and here's the script I used to deploy my script..  # Azure specific; using SQL Credentials vs. integrated auth $stepName = "CopyOver SCA DB Package - tenant"; $projectName = $OctopusParameters['Octopus.Project.Name']; $currentRelease = $OctopusParameters['Octopus.Release.Number']; $OutputPath = $OctopusParameters["Octopus.Action[$stepName].Output.Package.InstallationDirectoryPath"]; $TenantDBName = "#{DatabaseName}"; $SCAProjectName = "Database"; $DBStartDate=(GET-DATE) Write-Host "projectName is $SCAProjectName"; Write-Host "Database Name is $TenantDBName"; & {  # see https://documentation.red-gate.com/sca3/automating-database-changes/add-ons/octopus-deploy/deploy-a-database-package-to-a-single-environment-using-octopus-deploy-and-powershell#DeployadatabasepackagetoasingleenvironmentusingOctopusDeployandPowerShell-2.Setuptheprojectvariables # Since we're not using the cmdlets, and calling directly, we have to pass the '$UseWindowsAuth' along with the credentials     $UseWindowsAuth = $false #$DatabaseUserName = '#{SQLServerUsername}';     #$DatabasePassword = '#{SQLServerPassword';     $DatabaseServer="#{DatabaseServer}"; $DatabaseName=$TenantDBName; $ForceDeployWithoutBaseline="False"; $ReleaseVersion=$currentRelease;     $Environment = "#{Octopus.Environment.Name}";     &"$OutputPath\db\project\bin\Debug\Database_DeployPackage.ps1"  } $DBEndDate=(GET-DATE) #display processing time with the current database with format of hh:mm:ss. Write-Host ("Processed {1} with the duration of (hh:mm:ss) {0:c}" -f (NEW-TIMESPAN –Start $DBStartDate –End $DBEndDate), $TenantDBName) Thank you! Nestea / comments
Hello, Guys.  I found this issue and I think it's related to my case.  But only difference is I'm using Octopus deploy.  Is there any documentation on how to implement this kind of setup in Octopus...
0 votes