AzOps-Accelerator
AzOps-Accelerator copied to clipboard
Add support for custom sort order
Overview/Summary
Add option to configure in which order templates will be deployed by adding a conditional step between Diff and Validate/Deploy.
I am a bit uncertain on if the variable AZOPS_CUSTOM_SORT_ORDER
should be put into the credentials variable group or if a new group should be created. If a new group should be created, I am uncertain of what to name it.
I have considered the following names:
- azops
- azopsConfig
- config
I do not think it should be named anything related to settings to avoid confusion with settings.json
This PR fixes/adds/changes/removes
- Add support for custom sort order of templates
Breaking Changes
For Azure DevOps only: Requires creation of variable group azops
as well as granting pipelines access to that group.
Testing Evidence
CustomSorting step sorts files in diff.txt
Deploy step uses parameter -CustomSortOrder and picks up on the order in diff.txt
As part of this Pull Request I have
- [x] Checked for duplicate Pull Requests
- [x] Associated it with relevant issues, for tracking and closure.
- [x] Ensured my code/branch is up-to-date with the latest changes in the
main
branch - [x] Performed testing and provided evidence.
- [x] Updated relevant and associated documentation. (https://github.com/Azure/AzOps/pull/660)
Fixes Azure/AzOps#592
I have tested the functionality and it works as expected - awesome job! 😄 Do you think it makes sense to externalize the script as it becomes quite cumbersome to manage 30+ lines of PS directly in the yaml pipeline?
Sure, I can put the code in a scripts folder. How about .pipelines/.script/customSortOrder.ps1?
Or maybe have a generic location for both GitHub and ADO? Maybe .scripts/customSortOrder.ps1?
Sure, I can put the code in a scripts folder. How about .pipelines/.script/customSortOrder.ps1?
Or maybe have a generic location for both GitHub and ADO? Maybe .scripts/customSortOrder.ps1?
Sounds like a good plan to me!
Sorry for the delay, should be working now.