This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @Author : Kunal Das | |
# Date : 30-12-2022 | |
variables: | |
poolstagingarea: $(Build.ArtifactStagingDirectory)\poolstaging | |
BuildConfiguration: release | |
SQLPoolartifactname: AzureSQLPool | |
SQLPooldacpacfile: $(System.ArtifactsDirectory)\$(SQLPoolartifactname)\synapseSQLpoolDEV.sqlproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- task: AzureSynapseWorkspace.synapsecicd-deploy.toggle-trigger.toggle-triggers-dev@2 | |
displayName: 'Toggle Azure Synapse Triggers' | |
inputs: | |
azureSubscription: 'syn-sp' | |
ResourceGroupName: 'Synapseqa-RG' | |
WorkspaceName: 'synapse-qa' | |
ToggleOn: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Get-Content -path $(System.DefaultWorkingDirectory)/_Synapse-CI-pipeline/drop/ARM/TemplateForWorkspace.json) -replace 'LS_AKV_DEV','LS_AKV_QA' | Set-Content -Path $(System.DefaultWorkingDirectory)/_Synapse-CI-pipeline/drop/ARM/TemplateForWorkspace.json | |
(Get-Content -path $(System.DefaultWorkingDirectory)/_Synapse-CI-pipeline/drop/ARM/TemplateParametersForWorkspace.json) -replace 'LS_AKV_DEV','LS_AKV_QA' | Set-Content -Path $(System.DefaultWorkingDirectory)/_Synapse-CI-pipeline/drop/ARM/TemplateParametersForWorkspace.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- task: AzureSynapseWorkspace.synapsecicd-deploy.synapse-deploy.Synapse workspace deployment@2 | |
displayName: 'Synpase deployment task for workspace: synapse-qa' | |
inputs: | |
TemplateFile: '$(System.DefaultWorkingDirectory)/_Synapse-CI-pipeline/drop/ARM/TemplateForWorkspace.json' | |
ParametersFile: '$(System.DefaultWorkingDirectory)/_Synapse-CI-pipeline/drop/ARM/TemplateParametersForWorkspace.json' | |
azureSubscription: 'syn-sp' | |
ResourceGroupName: 'synapseQA-RG' | |
TargetWorkspaceName: 'synapse-qa' | |
OverrideArmParameters: '-LS_AKV_QA_properties_typeProperties_baseUrl https://synapse-qa.vault.azure.net/' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The pipeline copies files from workspace publish branch and publishes artifact | |
# @author Kunal Das | |
# @version 1.0 | |
# @since 10-11-2022 | |
name: | |
-synapse-CI-low | |
trigger: | |
- workspace_publish | |
pool: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- bash: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Azure DevOps" | |
REPO="$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_git/$(Build.Repository.Name)" | |
EXTRAHEADER="Authorization: Bearer $(System.AccessToken)" | |
git -c http.extraheader="$EXTRAHEADER" clone $REPO | |
cd $(Build.Repository.Name) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- task: PublishPipelineArtifact@1 | |
displayName: 'Publish Pipeline Artifact' | |
inputs: | |
targetPath: '$(Build.ArtifactStagingDirectory)' | |
artifact: drop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az synapse workspace firewall-rule create --name devops-build-agent-ip\ | |
--workspace-name synapse-prod --resource-group synapse-prod-rg --yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- task: AzureCLI@2 | |
displayName: 'Add Build agent Ip to firewall' | |
inputs: | |
azureSubscription: 'sp-dev' | |
scriptType: ps | |
scriptLocation: inlineScript | |
inlineScript: 'az synapse workspace firewall-rule create --name devops-build-agent-ip --workspace-name qa1-ause-asy-01 --resource-group QA1-AUSE-ASY-ARG-01 --start-ip-address (Invoke-RestMethod http://ipinfo.io/json | Select -exp ip) --end-ip-address (Invoke-RestMethod http://ipinfo.io/json | Select -exp ip)' |
NewerOlder