Skip to content

Commit

Permalink
Merge pull request #8 from pagopa/PAGOPA-1157-update-cd-pipeline
Browse files Browse the repository at this point in the history
ci: Staging slot active only during the deployment phase
  • Loading branch information
cap-ang committed Aug 10, 2023
2 parents f84984d + 6daa31f commit 79ac4ff
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .devops/deploy-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -212,4 +223,15 @@ stages:
ResourceGroupName: $(RESOURCE_GROUP)
SourceSlot: staging
SwapWithProduction: true
Slot: production
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

0 comments on commit 79ac4ff

Please sign in to comment.