简体   繁体   中英

Force download and install extension when missing in Azure DevOps

I have an Azure DevOps YAML which creates resources on azure with Terraform. In order to achieve that I have used this terraform extension for Azure DevOps. My goal is to re-use this template in the future on other organizations.

I want to use this YAML template without installing this or any other extension manually.

  1. Is there a way to force the YAML to install the extensions that are missing?
  2. Is there a way to write a Powershell/any other programming languages to download and install the extensions?

You can't force download an extension in the YAML :/ but you can use the Rest API Install Extension By Name to install the extension problematically, with PowerShell for example.

In addition, you can use Azure DevOps CLI to install the extension.

So you can add a PS task that check if the extension exist, if not - install it.

Or just script that install it and in the first time run the script in the organization.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM