Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Skip test folder name for ptn (#1622)
## Description Closes #1470 - If the module is of type `ptn`, skip Pester test checking for `defaults` and `waf-aligned` test folders - Updating workflow job conditions accordingly. PsRule jobs running only on `defaults `and `waf-aligned` folders, need to be skipped if the value of `psRuleModuleTestFilePaths `is empty. `psRuleModuleTestFilePaths `is the variable calculated by the initialize pipeline job, hosting the path to the deploy test Test performed in a different branch (main) where a "fake" pattern module is created with no `defaults` or `waf-aligned` test folders. Pester tests for telemetry and orphaned modules have been commented during testing. PR 1620 contains, for reference, also the "fake" files used to test this update. 1. push to main - complete, success (publish runs) ![image](https://github.com/Azure/bicep-registry-modules/assets/56914614/75589a6d-30fe-40e4-b0f6-e24e813c8e16) 1. manual run - only static, success (publish is skipped) ![image](https://github.com/Azure/bicep-registry-modules/assets/56914614/7f28195a-b414-4f01-b5e4-62d43a282081) 1. manual run - only deployment (publish is skipped) ![image](https://github.com/Azure/bicep-registry-modules/assets/56914614/2e76bb48-3819-42a3-be65-637b46c48620) 1. push to main - complete, static fails (deployment and publish are skipped) ![image](https://github.com/Azure/bicep-registry-modules/assets/56914614/a09bc275-94d5-4d74-8496-2e4c82439537) 1. push to main - cancel pipeline while running static (deployment and publish are skipped) ![image](https://github.com/Azure/bicep-registry-modules/assets/56914614/c1bc0559-c084-42b4-9473-8b5cf0ee8d5b) 1. manual run - complete, success (publish runs) ![image](https://github.com/Azure/bicep-registry-modules/assets/56914614/8502e41a-41ed-4a6f-9681-4dbac97c36f8) ## Pipeline Reference <!-- Insert your Pipeline Status Badge below --> | Pipeline | | -------- | | [![avm.ptn.batch.batch-account-ptn](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.ptn.batch.batch-account-ptn.yml/badge.svg)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.ptn.batch.batch-account-ptn.yml) (test ptn) | | [![avm.res.key-vault.vault](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.key-vault.vault.yml/badge.svg)](https://github.com/eriqua/bicep-registry-modules/actions/workflows/avm.res.key-vault.vault.yml) (test res) | ## Type of Change <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] Update to CI Environment or utlities (Non-module effecting changes) - [ ] Azure Verified Module updates: - [ ] Bugfix containing backwards compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in `version.json`: - [ ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description. - [ ] The bug was found by the module author, and no one has opened an issue to report it yet. - [ ] Feature update backwards compatible feature updates, and I have bumped the MINOR version in `version.json`. - [ ] Breaking changes and I have bumped the MAJOR version in `version.json`. - [ ] Update to documentation ## Checklist - [x] I'm sure there are no other open Pull Requests for the same update/change - [ ] I have run `Set-AVMModule` locally to generate the supporting module files. - [x] My corresponding pipelines / checks run clean and green without any errors or warnings <!-- Please keep up to day with the contribution guide at https://aka.ms/avm/contribute/bicep -->
- Loading branch information