2
votes

I've got a Release/Pipeline working perfectly. The pipeline create the artifacts and the release release them on specific servers.

But one of my task that do the release is a powershell script and I cannot store it on the repo used by our developer (they can delete it by mistake); I would like to store it on another Azure devops repository.

Is there a way through a task running in a release A (linked to a repository A) , to download a file from another repo B. ?

2
Have you checked the following replies? Are they helpful?Cece Dong - MSFT
So your developer can delete a file from git by mistake? All that filter-branch stuff by mistake?Wolfgang Kuehn

2 Answers

3
votes

If you use YAML pipeline, you can check out multiple repositories in your pipeline. Since you use Azure Repos Git repositories in the same organization, you can use the inline syntax.

steps:
- checkout: self
- checkout: git://MyProject/MyRepo # Azure Repos Git repository in the same organization
1
votes

Yes, you can put the PS script in repo B, and in the release add repo B as a source artifact.

enter image description here

Now, the release will download the script to the artifacts folder in the agent.