0
votes

I'm trying to deploy an arm template with a DSC extension in VSTS. This easily works with visual studio 2017. I just right click the solution and deploy and all works smoothly. However in VSTS it always fails if I include the DSC?

This is what i do in steps in VSTS: I have my code in a VSTS git repository 1) In VSTS I Go to Build&Release menu 2) Click on the NEW button 3) Select a Template - Empty Process 4) Click on Get Sources 5) Select This Project 6) For Repository I select the repository my Templates are stored 7) I select the relevant Branch im working with 8) Add a Task 9) Azure Resource Group Deployment 10) I select my Azure Subscription 11) I select my resource group 12) Template Location - left at default which is Linked Artiifact (what is this?) 13) Template - I click on the 3 dots and point it to my repository where my template is in VSTS 14) Template Parameters - as above but point it to the azure parameters JSON file 15) Override template parameters, put my VMname in , Admin Name and Password, leave _artifactsLocation Blank and leave _artifactsLocationSasToken Blank 17) Default Agent queue - Hosted 18) Click save and queue

It the goes off and starts a build, after a short while the following error appears : Im trying to deploy an arm template with a DSC extension in VSTS. This easily works with visual studio 2017. I just right click the solution and deploy and all works smoothly. However in VSTS it always fails if I include the DSC?

This is what i do in steps in VSTS: I have my code in a VSTS git repository 1) Go to Build&Release from the VSTS menu 2) Click on the NEW button 3) Select a Template - Empty Process 4) Click on Get Sources 5) Select This Project 6) For Repository I select the repository my Templates are stored 7) I select the relevant Branch im working with 8) Add a Task 9) Azure Resource Group Deployment 10) I select my Azure Subscription 11) I select my resource group 12) I select my location 13) Template - I click on the 3 dots and point it to my repository where my teamplate is 14) Template Parameters - as above but point it to the azure parameters JSON file 15) I then Queue and Build

The machines are built etc but the DSC doesn't deploy and i get the error below? Anyone advise?

There were errors in your deployment. Error code: DeploymentFailed. At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-debug for usage details. Details: Conflict: { "status": "Failed", "error": { "code": "ResourceDeploymentFailure", "message": "The resource operation completed with terminal provisioning state 'Failed'.", "details": [ { "code": "VMExtensionProvisioningError", "message": "VM has reported a failure when processing extension 'Microsoft.Powershell.DSC'. Error message: \"The DSC Extension received an incorrect input: Configuration.url is '/DSC/dsc.zip'. This is not a valid URL.\nPlease correct the input and retry executing the extension.\"." } ] } } undefined Task failed while creating or updating the template deployment.

1
Hi and welcome to Stack Overflow, please read how to create a Minimal, Complete, and Verifiable example and also check How to Ask Good Questions so you increase your chances to get feedback and useful answers.DarkCygnus

1 Answers

1
votes

The error is pretty obvious, you are trying to point the DSC extension to a local file. upload a file to some publicly available place and point the DSC extension to that url.