feat: add conditional powershell-yaml module check to tooling test#494
feat: add conditional powershell-yaml module check to tooling test#494
Conversation
Co-authored-by: jtracey93 <41163455+jtracey93@users.noreply.github.com>
|
Thanks @copilot. Can we make this check only happen from the main Deploy-Accelerator function if the customer has provided .yaml files as inputs. If they have provided .json files this isn't needed |
Co-authored-by: jtracey93 <41163455+jtracey93@users.noreply.github.com>
Co-authored-by: jtracey93 <41163455+jtracey93@users.noreply.github.com>
|
@jaredfholgate thoughts? |
Updated the implementation to make the YAML module check conditional. It now only runs when YAML files (.yml or .yaml extensions) are detected in the input configuration file paths. The check supports both direct file path parameters and the ALZ_input_config_path environment variable. Changes made in commit f05eb11. |
jaredfholgate
left a comment
There was a problem hiding this comment.
Just some code quality stuff
Co-authored-by: jaredfholgate <1612200+jaredfholgate@users.noreply.github.com>
|
@copilot the linting is failing because you left some trailing whitespace in the file you edited |
Co-authored-by: jaredfholgate <1612200+jaredfholgate@users.noreply.github.com>
Pull Request
Issue
Issue #, if available: Fixes Azure/Azure-Landing-Zones#2317
Description
Description of changes:
The
powershell-yamlmodule is required for YAML config file parsing (used inGet-ALZConfig.ps1) but was not validated in pre-deployment checks. This adds a conditional check inTest-Tooling.ps1that only runs when YAML files are provided as input configuration files.Changes to Test-Tooling.ps1:
$checkYamlModuleto control whether the YAML module check is performedGet-Module -ListAvailable$hasFailureflag)Changes to Deploy-Accelerator.ps1:
$inputConfigFilePathsparameter andALZ_input_config_pathenvironment variable$hasYamlFilesflag toTest-Toolingvia the-checkYamlModuleparameterThe check follows the existing pattern used for Git, Azure CLI, and ALZ module validation. It only executes when YAML files are detected in the inputs, ensuring the module is not required when users provide only JSON files.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the projects associated license.
Original prompt
powershell-YAMLmodule installed inTest-Tooling.ps1Azure-Landing-Zones#2317💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.