[Azure DevOps Pipeline] Automatically delete branch preview environments after branch deletion
- Dominant language
- No language data
- Stars
- 346
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
In Azure DevOps Pipeline I am using branch preview environments as described on https://learn.microsoft.com/en-us/azure/static-web-apps/branch-environments?tabs=azure-devops
steps:
...
- task: AzureStaticWebApp@0
inputs:
...
production_branch: 'main'
This works fine as intended.
**Feature request** Once the branch the preview environment was created for is being deleted, delete the related branch preview environments automatically. For example, by adding an option "auto_cleanup_branch_preview_environments".
**Background**
- Not surprisingly, I have to delete the outdated branch preview environments manually by myself. As those environments are [limited to 10](https://learn.microsoft.com/en-us/azure/static-web-apps/quotas), I have to do this far too often.
- Seems as if at least for pull requests at GitHub a cleanup is already supported for time being
# Source: https://learn.microsoft.com/de-de/azure/static-web-apps/build-configuration?tabs=github-actions#build-and-deploy
close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
steps:
- name: Close Pull Request
uses: Azure/static-web-apps-deploy@v1
with:
action: "close"
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.