Skip to content

Instantly share code, notes, and snippets.

@kunalworldwide
Created February 16, 2023 13:43
Show Gist options
  • Save kunalworldwide/f94edee4616b5948813c3aa2d79e30da to your computer and use it in GitHub Desktop.
Save kunalworldwide/f94edee4616b5948813c3aa2d79e30da to your computer and use it in GitHub Desktop.
steps:
- task: PythonScript@0
displayName: 'Change SQL Pool'
inputs:
scriptSource: inline
script: |
search_text = 'synapsesqlpooldev'
replace_text = 'synapsesqlpoolqa'
with open(r'$(System.DefaultWorkingDirectory)/_Synapse-CI-pipeline/drop/ARM/TemplateForWorkspace.json', 'r') as file:
data = file.read()
data = data.replace(search_text, replace_text)
with open(r'$(System.DefaultWorkingDirectory)/_Synapse-CI-pipeline/drop/ARM/TemplateForWorkspace.json', 'w') as file:
file.write(data)
print("SQL pool changed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment