During continuous Deoloyment, Azure DevOps >> Pipelines >> Releases. There are two parts, Artifacts and Stages. Why do we need to setup a build pipeline and then specify a Git later?
Could anyone explain me why do I need this before Stages?
update: Build Yaml file:
trigger:
- production
pool:
vmImage: ubuntu-latest
resources:
repositories:
- repository: repos
type: git
name: repos-name
ref: refs/heads/production
steps:
- checkout: repos
- task: Synapse workspace deployment@2
displayName: Validate Synapse workspace Artifacts
inputs:
operation: 'validate'
ArtifactsFolder: '$(System.DefaultWorkingDirectory)'
ResourceGroupName: 'resource'
TargetWorkspaceName: 'workspace'
DeleteArtifactsNotInTemplate: true
- publish: $(System.DefaultWorkingDirectory)/ExportedArtifacts
artifact: SynapseArtifact
Why do we need to setup a build pipeline and then specify a Git later
It is not mandatory to add both the build and the git repo as artifacts. You can choose the appropriate artifact according to your actual situation.
According to the screenshots you provided, suppose you use the build pipeline to build a dedicated SQL pool and generate a DACPAC file, then deploy the SQL pool to Prod through the classic release pipeline; at the same time, you use the ARM template in the Azure repo to deploy the Azure Synapse workspace to Prod. The deployment of the dedicated SQL pool and Synapse workspace can be placed in two separate release pipelines or in one. Which resources to add as artifacts depends on your actual situation, and there is no single standard.
Update
According to your YAML and screenshots, your build pipeline is used to validate the Synapse artifacts and will trigger the release pipeline when the validation is passed. Then the release pipeline will deploy your ASA workspace automatically to Prod.