Reputation: 117
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. ?
Upvotes: 3
Views: 3788
Reputation: 31003
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
Upvotes: 4
Reputation: 41545
Yes, you can put the PS script in repo B, and in the release add repo B as a source artifact.
Now, the release will download the script to the artifacts folder in the agent.
Upvotes: 1