microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.43k stars 2.59k forks source link

[BUG]: AzureResourceManagerTemplateDeployment string replaces all substring '.bicep' to '.json' #18136

Open JaeTLDR opened 1 year ago

JaeTLDR commented 1 year ago

Task name

AzureResourceManagerTemplateDeployment

Task version

3

Environment type (Please select at least one enviroment where you face this issue)

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

windows-latest, ubuntu-latest

Task log

...
ARM Service Connection deployment scope - Subscription
##[debug]action=Create Or Update Resource Group
##[debug]location=australiacentral
##[debug]deploymentMode=Incremental
##[debug]templateLocation=Linked artifact
##[debug]csmFile=/home/vsts/work/1/s/<REPO>/M365/.bicep/m365automationfunctionapp-test.bicep
##[debug]csmParametersFile=/home/vsts/work/1/s
##[debug]overrideParameters=undefined
##[debug]outputVariable=undefined
##[debug]deploymentName=undefined
##[debug]USE_MSAL=undefined
##[debug]d5e052bf-edea-44eb-8917-3250611a0349 auth scheme = ServicePrincipal
##[error]Error: Ensure the Template file ( '/home/vsts/work/1/s/<REPO>/M365/.json/m365automationfunctionapp-test.bicep' ) is valid. Task failed while parsing with following error: ENOENT: no such file or directory, open '/home/vsts/work/1/s/<REPO>/M365/.json/m365automationfunctionapp-test.bicep'
##[debug]Processed: ##vso[task.issue type=error;]Error: Ensure the Template file ( '/home/vsts/work/1/s/<REPO>/M365/.json/m365automationfunctionapp-test.bicep' ) is valid. Task failed while parsing with following error: ENOENT: no such file or directory, open '/home/vsts/work/1/s/<REPO>/M365/.json/m365automationfunctionapp-test.bicep'
##[debug]Processed: ##vso[task.complete result=Failed;]Error: Ensure the Template file ( '/home/vsts/work/1/s/<REPO>/M365/.json/m365automationfunctionapp-test.bicep' ) is valid. Task failed while parsing with following error: ENOENT: no such file or directory, open '/home/vsts/work/1/s/<REPO>/M365/.json/m365automationfunctionapp-test.bicep'
Finishing: AzureResourceManagerTemplateDeployment

Relevant log output

...
##[debug]csmFile=/home/vsts/work/1/s/<REPO>/M365/.bicep/m365automationfunctionapp-test.bicep
....
##[debug]Processed: ##vso[task.complete result=Failed;]Error: Ensure the Template file ( '/home/vsts/work/1/s/<REPO>/M365/.json/m365automationfunctionapp-test.bicep' ) is valid. Task failed while parsing with following error: ENOENT: no such file or directory, open '/home/vsts/work/1/s/<REPO>/M365/.json/m365automationfunctionapp-test.bicep'

Aditional info

Issue occurs because bicep files were in a '.bicep' directory, this has been updated to just 'bicep' fixing the issue, I think the fact that it updated the full path of the file to run rather than only the extension is a bug.
JaeTLDR commented 1 year ago

Draft PR fixing the issue here: #18137

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

JaeTLDR commented 9 months ago

Will this be looked into?

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

JaeTLDR commented 3 months ago

A whole year and no one has looked into this??