diff --git a/.devops/deploy-pipelines.yml b/.devops/deploy-pipelines.yml index 62f2eb7..92dd7de 100644 --- a/.devops/deploy-pipelines.yml +++ b/.devops/deploy-pipelines.yml @@ -160,6 +160,17 @@ stages: - job: deployJava steps: # deploy reporting-fn + - task: AzureCLI@2 + displayName: Start staging slot [PROD] + condition: eq('${{ parameters.ENV }}', 'prod') + inputs: + azureSubscription: $(AZURE_SUBSCRIPTION) + addSpnToEnvironment: true + scriptType: 'bash' + scriptLocation: 'inlineScript' + failOnStandardError: true + inlineScript: | + az functionapp start --name ${{variables.APP_NAME}}-fn-gpd-batch --resource-group $(RESOURCE_GROUP) --slot staging - task: AzureFunctionAppContainer@1 displayName: Deploy Function App [DEV|UAT] condition: in('${{ parameters.ENV }}', 'dev', 'uat') @@ -212,4 +223,15 @@ stages: ResourceGroupName: $(RESOURCE_GROUP) SourceSlot: staging SwapWithProduction: true - Slot: production \ No newline at end of file + Slot: production + - task: AzureCLI@2 + displayName: Stop staging slot [PROD] + condition: eq('${{ parameters.ENV }}', 'prod') + inputs: + azureSubscription: $(AZURE_SUBSCRIPTION) + addSpnToEnvironment: true + scriptType: 'bash' + scriptLocation: 'inlineScript' + failOnStandardError: true + inlineScript: | + az functionapp stop --name ${{variables.APP_NAME}}-fn-gpd-batch --resource-group $(RESOURCE_GROUP) --slot staging \ No newline at end of file