Failed to parse file as legacy JSON template #6716
Unanswered
Malaw80s
asked this question in
General questions
Replies: 1 comment
-
|
In my case it was due to the tags I was passing in the scripts. I removed the tags and it started working. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I haven't run my pipeline for a while to create new images, so I made changes to reflect the new repo name, and made sure I'm pointing to the correct repository.
But When I'm running this PowerShell script in my pipeline in Azure:
I'm running into the error below:
2022-12-07T16:32:17.8765210Z fatal: not a git repository (or any of the parent directories): .git
2022-12-07T16:32:24.1160403Z Failed to parse file as legacy JSON template: if you are using an HCL template, check your file extensions; they should be either *.pkr.hcl or *.pkr.json; see the docs for more details: https://www.packer.io/docs/templates/hcl_templates.
2022-12-07T16:32:24.1163158Z Original error: Error parsing JSON: invalid character 'ÿ' looking for beginning of value
2022-12-07T16:32:24.1163569Z At line 1, column 1 (offset 1):
2022-12-07T16:32:24.1164020Z 1: �
2022-12-07T16:32:24.1174234Z ^
Any help will be appreciated :)
Platforms affected
Azure DevOps
Virtual environments affected
Windows Server 2022
Image version and build link
I'm using the latest from master
Is it regression?
No
Expected behavior
To be able to generate the resources and images.
Actual behavior
Failing after the storage account is created
Repro steps
Import the helper to GenerateResourcesAndImages
Run the GenerateResourcesAndImages script
It will error out
Beta Was this translation helpful? Give feedback.
All reactions