Skip to content

Commit

Permalink
Refactor: restart app services (#366)
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran authored Nov 3, 2023
2 parents e77c0b5 + 2ff282b commit 98173ba
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
18 changes: 18 additions & 0 deletions terraform/mst/azure-restart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
schedules:
- cron: 0 10 * * * # timezone is UTC
displayName: "Restart app services nightly"
branches:
include:
- dev
always: true

pr: none

pool:
vmImage: ubuntu-latest

stages:
- template: ../pipeline/restart.yml
parameters:
# path is relative to the template path (see line above)
variable_file: ../mst/azure-vars.yml
29 changes: 29 additions & 0 deletions terraform/pipeline/restart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
parameters:
- name: variable_file
type: string

stages:
- stage: RestartAppServices
variables:
- template: ${{ parameters.variable_file }}
jobs:
- job: Restart
steps:
- task: AzureAppServiceManage@0
displayName: 'Restart Azure App Service: dev'
inputs:
azureSubscription: deployer
Action: 'Restart Azure App Service'
WebAppName: '$(TF_VAR_AGENCY_CARD)-eligibility-server-dev'
- task: AzureAppServiceManage@0
displayName: 'Restart Azure App Service: test'
inputs:
azureSubscription: deployer
Action: 'Restart Azure App Service'
WebAppName: '$(TF_VAR_AGENCY_CARD)-eligibility-server-test'
- task: AzureAppServiceManage@0
displayName: 'Restart Azure App Service: prod'
inputs:
azureSubscription: deployer
Action: 'Restart Azure App Service'
WebAppName: '$(TF_VAR_AGENCY_CARD)-eligibility-server-prod'
18 changes: 18 additions & 0 deletions terraform/sbmtd/azure-restart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
schedules:
- cron: 0 10 * * * # timezone is UTC
displayName: "Restart app services nightly"
branches:
include:
- dev
always: true

pr: none

pool:
vmImage: ubuntu-latest

stages:
- template: ../pipeline/restart.yml
parameters:
# path is relative to the template path (see line above)
variable_file: ../sbmtd/azure-vars.yml

0 comments on commit 98173ba

Please sign in to comment.