I am trying to set up the pipeline setup in Azure DevOps to import functions to API. We have self hosted agent for Windows and we are using that as an agent. We are trying to run the below command
I have tried installing the below before running the import command:
When we run it in Azure CLI( not in pipeline) we are able to execute it without a problem. I have tried running the same command in Powershell tasks ,Azure CLI, Azure Powershell inline scripts and so on ( all the available options in DevOps pipeline I have tried) . I am getting something or the other error and not able to proceed. Few errors I have seen is as below:
Is there a definite task available in azure pipeline to run this module?
CodePudding user response:
You could try to install the Az Module and AzureRM module in your self-hosted agent first. Then run the pipeline to check if it works.
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
Install-Module -Name AzureRM -AllowClobber
In Microsoft-hosted agents, these modules are pre-installed. For more information, you could refer to the documentation.