Comments (1)
Have also come across this problem, with one master .sql file referencing several additional files using SQLCMD :r syntax. Files are in the right locations in the release artifact and so it is a reasonable working assumption that calling the master should find the additional files which were alongside it.
I have tried a work around which is to change the reference in the master script to accept a path variable. Here's an extract from my response to the issue on stack overflow
While the script file gets copied to another location it can still access the previous script files from the original artifact.
So I tried successfully to pass the original path location as a variable to the master script file
This would have the following change to your original file;
PRINT N'Execute PreDeployKeysAndSystemUsers.sql'
:r $(ScriptFolder)\PreDeployKeysAndSystemUsers.sql
PRINT N'Execute PreDeployUsersAndRoles.sql'
:r $(ScriptFolder)\PreDeployUsersAndRoles.sql
PRINT N'Execute PreDeployDDLStatements.sql'
:r $(ScriptFolder)\PreDeployDDLStatements.sql
And for the SQL Server database deploy task I updated the Additional Arguments to include
-Variable @("ScriptFolder=$(System.DefaultWorkingDirectory)\_My_Artifact_Folder\My_Script_Path" , "other_variables...")
Now the master script can be executed from anywhere and will still find the additional scripts as long as they're on the same build agent.
from azure-pipelines-tasks.
Related Issues (20)
- [Question]: How to use the Publish Pipeline Metadata task
- [REGRESSION]: HOT 3
- [enhancement]: AzureFunctionApp Task does not update the LinuxFxVersion to match the Runtime Stack
- [BUG]: AzurePowerShellV5 task is logging partial federatedToken
- [Question]: Is my error a result of needing to run CocoaPods task? HOT 1
- [BUG]: SqlAzureDacpacDeployment: does not server name when it contains a dot (Azure SQL Managed Instance)
- [BUG]: AzurePowerShell@5 is failing to find parameter FederatedToken HOT 1
- [Question]: Unable to download from Storage Account since using WIF and @AzureFileCopy6 HOT 4
- [REGRESSION]: Failed to perform Auto-login: PSContextCredentialexec: "pwsh": executable file not found in %PATH%. HOT 4
- [Question]: Issue with the Federate Credential login on Azure Cli task HOT 5
- [BUG]: DockerV2 L0 test broken
- [BUG]: AzureResourceManagerTemplateDeployment failure after ubuntu-latest was updated to 22.04.4 (20240516.1.0) HOT 1
- [BUG]: AzureFunctionAppContainer@1 sets linuxFxVersion instead of windowsFxVersion for windows image HOT 2
- [BUG]: AzurePowerShell@5 is failing to install Az modules HOT 2
- The process '/Users/runner/work/1/s/gradlew' failed with exit code 1 HOT 8
- [BUG]: VSTest@3
- [BUG]: Azure yml pipeline Gradle task failed - ##[error]Error: The process '/Users/runner/work/1/s/gradlew' failed with exit code 1 HOT 1
- [Question]: PublishCodeCoverageResultsV1 Where it the publish directory?
- Could not find the module Az.Accounts with given version. If the module was recently installed, retry after restarting the Azure Pipelines task HOT 1
- [Question]: Why am I getting a Warning about AzureRM? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-pipelines-tasks.