Giter Club home page Giter Club logo

Comments (10)

mathieu-benoit avatar mathieu-benoit commented on September 15, 2024 2

Hi @dannal, @way0utwest (CC: @julienstroheker and @wbuchwalter), to fix the issue you need to make sure to use the "version 1." of the "Azure Resource Group Deployment" VSTS task. I don't know why but that the way I found as an alternative (v2. is new so need to see what is changed and needed to be adapted).
image

Note: by clicking on "version 1.*" you are loosing all the value of your fields but by doing copy/paste stuff, you should be good.

from partsunlimited.

way0utwest avatar way0utwest commented on September 15, 2024 1

@mathieu-benoit @julienstroheker Thank you for the note. This fixed my issue and I can deploy the RG, though with a few items you may want to update on the lab.
If there is a way to make/suggest changes as a PR, please let me know here.

  1. Make sure that Task 4, Step 1.10 notes that v1 of the ARM deployment task is needed.
  2. update Task 4, Step 1.10 to note that deployment mode is complete or incremental. I prefer that you specify the various items that may confuse someone. I am not sure if the first deployment with complete was needed, though I have deployed with both complete and incremental since then.
  3. For the override parameters in Task 4, Step 1.10, it appears that "powershell" is required in the instructions, but this isn't a parameter. At least, leaving that in caused me an error. I think this should be removed. It would be helpful to have a screenshot here that shows the parameters since you can click the ellipsis and get the list of items.
  4. In Task 4, Step 3.2, the reference is the AzureRm Web App Deployment. I don't see this referenced, but I do see (https://www.visualstudio.com/en-us/docs/build/steps/deploy/azure-web-app-deployment) that Azure Web App Deployment is deprecated. I realize that Azure moves fast, and you may not control this, but I would prefer that old tasks be listed with a note they are no longer available and to use xx task instead. Barring that, the description for Azure App Server Deploiy should note superceeds other tasks. There is far too much documentation that won't make sense (including this lab), because you've changed the name and function of tasks. One thing I'd ask is that you remember while you are on this journey of evolving Azure, there are people coming to the platform for the first time, and lost of old documentation that references names you've removed makes this extremely confusing. It would be better to just keep the old task name and have it be a copy of the Azure App Deploy.
  5. In Task 4, Step 3.10, you reference PartsUnlimitedWebsite.zip, while the image shows partsunlimited.zip, which is what I have.
  6. In Task 4, Step 3.12, image woefully out of date.

Working through more potential issues with the deployment to dev now.

from partsunlimited.

dannal avatar dannal commented on September 15, 2024

I am having a similar error when executing the Create or Upgrade Resource Group Action with an error of " ##[error]Ensure the Template file is valid. Task failed while parsing with following error: Unexpected token ". Unfortunately I have not been able to figure issue out.

If I run the deployment ps1 script from the env directory, all seems fine.

Full log shown below.

2017-03-05T03:30:35.9203114Z ##[section]Starting: Azure Deployment:Create Or Update Resource Group action on pudrgdja1
2017-03-05T03:30:35.9653111Z ==============================================================================
2017-03-05T03:30:35.9653111Z Task : Azure Resource Group Deployment
2017-03-05T03:30:35.9653111Z Description : Deploy, start, stop, delete Azure Resource Groups
2017-03-05T03:30:35.9653111Z Version : 2.0.1
2017-03-05T03:30:35.9653111Z Author : Microsoft Corporation
2017-03-05T03:30:35.9653111Z Help : More Information
2017-03-05T03:30:35.9653111Z ==============================================================================
2017-03-05T03:30:36.7689534Z 78530058-65fc-4080-a3c2-afc5b199cce0 exists true
2017-03-05T03:30:36.7749532Z Checking if the following resource group exists: pudrgdja1.
2017-03-05T03:30:37.5272492Z Resource group exists: false.
2017-03-05T03:30:37.5282508Z Creating resource Group: pudrgdja1
2017-03-05T03:30:38.9169585Z Resource Group created successfully.
2017-03-05T03:30:38.9169585Z Creating deployment parameters.
2017-03-05T03:30:38.9307353Z ##[error]Ensure the Template file is valid. Task failed while parsing with following error: Unexpected token 
2017-03-05T03:30:38.9377369Z ##[section]Finishing: Azure Deployment:Create Or Update Resource Group action on pudrgdja1

from partsunlimited.

way0utwest avatar way0utwest commented on September 15, 2024

Interesting, I was able to get this to deploy from PoSh, but not from VSTS. I'm not sure which part of the template file is invalid. I've changed a number of names in the variables, but it doesn't seem to matter.

from partsunlimited.

dannal avatar dannal commented on September 15, 2024

Yes, I could also deploy by using the deployment powershell scripts. I also validated the template, it appears fine. I have tried using a params file, no params file, etc from within VSTS with no luck. Very keen to get the releases working from within VSTS, but now out of ideas. :-(. I take some comfort not being the only one having this issue...

from partsunlimited.

julienstroheker avatar julienstroheker commented on September 15, 2024

@mathieu-benoit can you do a PR about that ?

from partsunlimited.

julienstroheker avatar julienstroheker commented on September 15, 2024

@way0utwest you are more than welcome to do a PR with all your comments !
Thanks :)

from partsunlimited.

NicolasRiou avatar NicolasRiou commented on September 15, 2024

Hello, same issue here :

2017-03-15T13:36:42.6078547Z ##[section]Starting: Azure Deployment:Create Or Update Resource Group action on test-a-la-con
2017-03-15T13:36:42.6547229Z ==============================================================================
2017-03-15T13:36:42.6547229Z Task : Azure Resource Group Deployment
2017-03-15T13:36:42.6547229Z Description : Deploy, start, stop, delete Azure Resource Groups
2017-03-15T13:36:42.6547229Z Version : 2.0.4
2017-03-15T13:36:42.6547229Z Author : Microsoft Corporation
2017-03-15T13:36:42.6547229Z Help : More Information
2017-03-15T13:36:42.6547229Z ==============================================================================
2017-03-15T13:36:43.0609721Z 9f191478-e6b8-430e-b337-7dae19d854a6 exists true
2017-03-15T13:36:43.0765972Z Checking if the following resource group exists: test-a-la-con.
2017-03-15T13:36:43.4921529Z Resource group exists: true.
2017-03-15T13:36:43.4921529Z Creating deployment parameters.
2017-03-15T13:36:43.5078073Z ##[error]Ensure the Template file is valid. Task failed while parsing with following error: Unexpected token /
2017-03-15T13:36:43.5078073Z ##[section]Finishing: Azure Deployment:Create Or Update Resource Group action on test-a-la-con

Deployment of the resource group is fine with Visual Studio or even Powershell. I only have this error with VSTS

from partsunlimited.

NicolaiPetri avatar NicolaiPetri commented on September 15, 2024

This most likely happens because you have inline comments in your json // ... or /* xxxx */
Please remove this and make sure json validates using a offline validator or an online validator like jsonlint.com

from partsunlimited.

pmooij avatar pmooij commented on September 15, 2024

We had the same issue and like Nicolai mentioned this was caused to inline comments // ... or /* xxxx */
However, we do value the comments in source control over having a pure json template file.

Therefore we added a Powershell step with the below inline-script to run a Regex replace over the template, transforming it into a purified JSON template at runtime.

Param (
$template = "$(System.DefaultWorkingDirectory)\ARM-template.json",
$regex = '(// .)|(/*[\w\s]*/)'
)
Write-Host "Replacing Regular Expression '$regex' in $([System.IO.Path]::GetFileName($template))..."
(Get-Content $template) -replace $regex, '' | Set-Content $template

from partsunlimited.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.