VSTS: Pass build/release variables into Powershell script task

前端 未结 4 1832
忘掉有多难
忘掉有多难 2020-12-04 16:32

Ideally, I would want to configure our Azure Web App application settings using build variables (on VSTS), for example:

We perform our publish tasks using P

4条回答
  •  借酒劲吻你
    2020-12-04 17:19

    The variables have already been passed to PowerShell script when the build start. If I understand your question correctly, you want to use these variables together instead of specifying them one by one like following:

    PrepareAppSettings.ps1 -websiteName "MyWebApp" -appsettings $(AllVariables)
    

    Then there isn't any way to do this.

    If you want to reduce the strings passed to the PowerShell script, you can set the variable as following:

    VariableName: MyRandomService | Value:"MyRandomService" = xxxxxxxx

    Then you just need to call the PowerShell script with variable name passed.

提交回复
热议问题