Azure Devops – Copy Recordsdata From Git Repository To Azure Storage Account
On this article, we’re going to learn to copy the information from the git repository to an Azure Storage Account.
Stipulations
- A legitimate Azure Subscription
- A legitimate Azure DevOps Account
- Create a Storage account and create a Container named “sourcefiles”. As proven under the container is empty.
Azure DevOps – Storage Account – Empty
On this article, we’re going to construct the next two pipelines utilizing Basic editor. You possibly can observe the identical method even if you want to create YAML base pipelines.
- Construct Pipeline – The construct pipeline copies the information from Azure DevOps repository to the Azure DevOps artifacts
- Launch Pipeline – The discharge pipeline picks the information from the Azure DevOps artifacts to Storage Account.
Let’s begin authoring the pipelines
Create an Artifactory
As proven under, create a set of information within the repository that you just want to copy to Azure Storage account. For the sake of this text, I’ve created a folder and two information.
Azure DevOps – Git Repository – Static Recordsdata
Create Construct Pipeline
On this part, we’ll work on making a Construct pipeline for copying the information from the Azure DevOps – Git repository to Azure DevOps antifactory. It’s a two-step course of.
Step | Process | Feedback |
Step1 | Copy Recordsdata | On this step, the Copy Recordsdata activity copies the information from the Azure DevOps repository to a Staging listing $(Construct.ArtifactStagingDirectory) of the Agent |
Step2 | Publish Construct Artifacts | On this step, the Publish Construct Artifacts activity, copies the information from the Staging Listing $(Construct.ArtifactStagingDirectory) to the Azure DevOps artifacts from the place the Launch pipeline might choose. |
Under is the way it appears as soon as the above two duties are created.
Step 1 – Copy information Process
Azure DevOps – Construct Pipelines – Copy Recordsdata Process
Step 1 – Publish Construct Artifacts Process
Azure DevOps – Construct Pipelines – Publish Construct Artifacts Process
Run the Construct Pipeline to rapidly validate if all the pieces is working high-quality. When you see the textual content 1 revealed then the Construct pipeline is working nicely. You can too click on on 1 Printed artifact and see the contents to make sure that the required information are packages as artifact.
Azure DevOps – Construct Pipelines – Printed Artifact
Create Launch Pipeline
Let’s now work on authoring the Launch pipeline with an Empty Job and configure the under steps.
Add an Artifact by selecting the Construct Pipeline as proven within the under screenshot.
Azure DevOps – Construct Pipelines – Add Artifact
Step 1 – Azure File Copy activity
On this part, let’s use the Azure File Copy activity to repeat the information from the Azure DevOps artifacts to Azure Storage Account.
Azure DevOps – Launch Pipelines – Azure File Copy
That’s it. We’ve configured each the Construct Pipeline and the Launch pipeline. Let’s run the Launch pipeline by clicking on Create Launch button
In my case, I’ve confronted an error with the message Standing: 403 This request isn’t licensed to carry out this operation utilizing this permission as proven under.
Azure DevOps – Launch Pipelines – Azure File Copy – Model Four error
It appears like there may be an error within the Azure File Copy activity’s model 4. So, I’ve modified the model again to three as proven under.
Azure DevOps – Launch Pipelines – Azure File Copy – Model 3
Let’s run the Pipeline once more and it labored nicely as proven under.
Azure DevOps – Launch Pipelines – Profitable Launch
And, I can see each the information copied into Storage Account as nicely which is proven under.
Azure DevOps – Storage Account
That’s it. We’ve learnt how one can copy the information from Azure DevOps git to Storage Account.