I am using SQL Server Database Deployment task in azure release pipeline to take back up of the database I need to set backup filename/path in a pipeline variable to use it in another task under a different deployment group in the same stage to restore the DB in case of any release error.
I already found a way to set variable value in "Run Inline powershell" task using ##vso[task.setvariable variable=variableName;]value
But for SQL Server Deployment task, i couldn't find anything as such. "Settable at release time" flag is turned ON for the variable.
Basically the requirement is to back up the Database and restore in case of any error in the DACPAC release. Please suggest a way to set the variable value in SQL Server Deployment task or any alternate way to achieve my requirement. I need the value of SQL variable @FullPath in a Pipeline Variable dynamically set during the release time.