microsoft / azure-pipelines-tasks

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

Azure Resource Group Deployment - Override template parameters not working when using pipeline variables #10464

Closed roybongers-oce closed 3 years ago

roybongers-oce commented 5 years ago

Note

Issues in this repo are for tracking bugs, feature requests and questions for the tasks in this repo

For a list:
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

If you have an issue or request for the Azure Pipelines service, use developer community instead:

https://developercommunity.visualstudio.com/spaces/21/index.html )

Required Information

Entering this information will route you directly to the right team and expedite traction.

Question, Bug, or Feature?
Type: Bug

Enter Task Name: Azure Resource Group Deployment V2

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

Issue Description

Azure Resource Group Deployment - Override template parameters button NOT working when using pipeline variables

Error: Failed to download the template file from the given path '$(System.DefaultWorkingDirectory)/$(Release.Artifact_IaC)/$(Release.Path_IacShrd)/template002-ApiContent.json' with the following error: There is no such artifact '$(Release.Artifact_IaC)' linked to this release pipeline.

Screenshot

Need this to override secret values derived from Azure Key Vault

Task logs

[Enable debug logging and please provide the zip file containing all the logs for a speedy resolution]

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

[Insert error from the logs here for a quick overview]

jalajmsft commented 5 years ago

Can you try adding the override parameters explicitly by clicking on "+ Add" button and check if works.

To avoid the error box from being displayed, mention the template file path by selecting it from the "Select file or folder" dialog by clicking on Meatballs Menu(3 dots) button next to template input box.

roybongers-oce commented 5 years ago

Hi, yes then it works but we already knew that but we want it to work with pipeline variables…

Kind regards, Roy

[Océ]https://www.oce.com Océ-Technologies B.V. P.O. Box 101, 5900 MA Venlo Sint Urbanusweg 43, 5914 CA Venlo The Netherlands | www.oce.comhttps://www.oce.com Trade register: 12002662

This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or with a 'reply' message and delete the message and its attachment(s), if any, from your system(s). Thank you for your co-operation.

From: Jalaj Minda [mailto:notifications@github.com] Sent: vrijdag 24 mei 2019 12:20 To: microsoft/azure-pipelines-tasks Cc: Bongers, Roy; Author Subject: Re: [microsoft/azure-pipelines-tasks] Azure Resource Group Deployment - Override template parameters not working when using pipeline variables (#10464)

Can you try adding the override parameters explicitly by clicking on "+ Add" button and check if works.

To avoid the error box from being displayed, mention the template file path by selecting it from the "Select file or folder" dialog by clicking on Meatballs Menu(3 dots) button next to template input box.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azure-pipelines-tasks/issues/10464?email_source=notifications&email_token=ALH5LLZ5AMJWTSN4GOTK2ETPW66OFA5CNFSM4HO3L5P2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWE2QWA#issuecomment-495560792, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALH5LLZZ6NALFT56EPMSFIDPW66OFANCNFSM4HO3L5PQ.

jalajmsft commented 5 years ago

Pipeline variables will get resolved at run time and the task can succeed. Although they are not resolved during the design time as these variable can be modified later on during the run time.

Thank you for raising this, we will look at it as an enhancement. Adding @pulkitaggarwl

roybongers-oce commented 5 years ago

Hi, thanks for getting back on this so soon. Can you give an estimate of when this will be implemented?

With kind regards,

Roy Bongers Cloud Architect / DevOps Engineer | ICS Operations

+31 6 25659426 +31 77 359 2658 roy.bongers@oce.commailto:roy.bongers@oce.com

[Océ]https://www.oce.com Océ-Technologies B.V. P.O. Box 101, 5900 MA Venlo Sint Urbanusweg 43, 5914 CA Venlo The Netherlands | www.oce.comhttps://www.oce.com Trade register: 12002662

This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or with a 'reply' message and delete the message and its attachment(s), if any, from your system(s). Thank you for your co-operation.

From: Jalaj Minda [mailto:notifications@github.com] Sent: vrijdag 24 mei 2019 13:39 To: microsoft/azure-pipelines-tasks Cc: Bongers, Roy; Author Subject: Re: [microsoft/azure-pipelines-tasks] Azure Resource Group Deployment - Override template parameters not working when using pipeline variables (#10464)

Pipeline variables will get resolved at run time and the task can succeed. Although they are not resolved during the design time as these variable can be modified later on during the run time.

Thank you for raising this, we will look at it as an enhancement. Adding @pulkitaggarwlhttps://github.com/pulkitaggarwl

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azure-pipelines-tasks/issues/10464?email_source=notifications&email_token=ALH5LL22L25ZH4C2OJGPZ2TPW7HW3A5CNFSM4HO3L5P2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWFA6KQ#issuecomment-495587114, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALH5LL6YVWOHMXPYGOFDCZ3PW7HW3ANCNFSM4HO3L5PQ.

avishnyakov commented 5 years ago

@sachinma did we have updates or workaround on this one? Parameters override based on the ENV variables is very useful one.

bishal-pdMSFT commented 5 years ago

@roybongers-oce @avishnyakov can you please explain some scenario where variable based template path is important. I can understand the override value being based on pipeline variable, but can't see the importance of template file path itself being based on variables.

roybongers-oce commented 5 years ago

Hi,

Thé scenario to use variables in the template and param file paths is to prevent a lot of manual changes to all release pipes individually when these paths change. Other release tasks (e.g. web app deploy task) can work with pipeline variables (groups)…

Kr, Roy Bongers

[Océ]https://www.oce.com Océ-Technologies B.V. P.O. Box 101, 5900 MA Venlo Sint Urbanusweg 43, 5914 CA Venlo The Netherlands | www.oce.comhttps://www.oce.com Trade register: 12002662

This message and attachment(s) are intended solely for use by the addressee and may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable law. If you are not the intended recipient or agent thereof responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or with a 'reply' message and delete the message and its attachment(s), if any, from your system(s). Thank you for your co-operation.

From: Bishal Prasad [mailto:notifications@github.com] Sent: dinsdag 29 oktober 2019 18:47 To: microsoft/azure-pipelines-tasks Cc: Bongers, Roy; Mention Subject: Re: [microsoft/azure-pipelines-tasks] Azure Resource Group Deployment - Override template parameters not working when using pipeline variables (#10464)

@roybongers-ocehttps://github.com/roybongers-oce @avishnyakovhttps://github.com/avishnyakov can you please explain some scenario where variable based template path is important. I can understand the override value being based on pipeline variable, but can't see the importance of template file path itself being based on variables.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azure-pipelines-tasks/issues/10464?email_source=notifications&email_token=ALH5LL3YO4GY2GXDDGKWDL3QRBZIRA5CNFSM4HO3L5P2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECROSJQ#issuecomment-547547430, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALH5LL33D7TEU6ZH2LE52GDQRBZIRANCNFSM4HO3L5PQ.

github-actions[bot] commented 3 years 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

zeeshanmcp12 commented 3 years ago

Hi Team, Is there any update on this issue?

I've a scenario where it's important. In ARM template deployment task, we do not mention the template path manually by selecting 3dots button, instead reference this in pipeline variable and put the value. for example:

$(System.DefaultWorkingDirectory)//<published artifact (i.e drop)>/$(TemplateFolderRoot)/$(TemplateFile)

and in pipeline variable: Name Value TemplateFolderRoot src\ARMTemplates\xyzProject TemplateFile xyzProject.Template.json

I hope it makes sense. Let me know please if you require any further information.