'Script path of PowerShell task Azure DevOps release
I have PowerShell script, that I would like to use in deployments of Dynamics 365 to migrate an Access Team Template to our Test and Prod environments.
I have added the PowerShell script to the repository, and I would now like to add a PowerShell task to each of the stages in the deployment to migrate the Access Team Teamplate correctly in each of the environments.
However, I am not sure how to reference the path of the script in each of the stages in the release. When I click on the three dots to select the file, it is looking at the Linked artifacts - and not the repo.
If I add the PowerShell task to the pipeline, then I can select the script from the three dots.
Is it possible to reference the script in the release somehow?
Solution 1:[1]
You need to add your repository as a artifact or publish this script as artifact in the pipeline.
First, use Add an artifact and select the repository where you keep the script:
Then you will get the repo as a regular artifact.
Another way is to publish this script. To do that you need to check the repo in the pipeline which you already have produce your primary artifact and publish just this script. Then it will become available as you already have a defined source of artifacts.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | JeffC |