Disable environment protection wait timer in workflow when not needed #60064
Replies: 2 comments 3 replies
-
|
Beta Was this translation helpful? Give feedback.
-
🕒 Discussion Activity Reminder 🕒 This Discussion has been labeled as dormant by an automated system for having no activity in the last 60 days. Please consider one the following actions: 1️⃣ Close as Out of Date: If the topic is no longer relevant, close the Discussion as 2️⃣ Provide More Information: Share additional details or context — or let the community know if you've found a solution on your own. 3️⃣ Mark a Reply as Answer: If your question has been answered by a reply, mark the most helpful reply as the solution. Note: This dormant notification will only apply to Discussions with the Thank you for helping bring this Discussion to a resolution! 💬 |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
After successfully deploying my application to Azure App Service, I want to ensure its health by implementing an environment protection rule. The rule will introduce a 5-minute wait period after the deployment is completed on the Azure side. Once the wait period is over, I will perform an HTTPS call in a GitHub Actions job to check the health of my Azure App Service application. In case the health check fails, I will initiate a rollback to the previous version.
Need/Implementation:
Have configured development environment with wait timer of 5 min.
-> Deploy the code to azure app service (While ignoring wait time for development env before running the job)
-> Do the API health check (While considering wait time for development env before running the job)
I have made attempts to fulfill my previous requirement in a couple of ways.
The first workflow snippet that I implemented is functioning correctly.
However, when I tried using the strategy: matrix: environment: [development] protection: [not-required] approach, it caused issues with the code responsible for deploying to Azure.
I am facing a challenge where I want to exclude the protection (wait timer) functionality in my strategy code. However, when I do so, it also ignores the environment configuration. Consequently, variables like env.AZURE_APP_SERVICE_NAME are not being recognized because the environment is being ignored. I'm looking for a solution that allows me to exclude the protection while still considering the environment configuration. Is there any way to accomplish this?
Beta Was this translation helpful? Give feedback.
All reactions