Stop app before deploy to prevent rsync file lock failures
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vendored
+17
-1
@@ -63,11 +63,27 @@ pipeline {
|
||||
)]) {
|
||||
bat 'az login --service-principal -u "%AZ_CLIENT_ID%" -p "%AZ_CLIENT_SECRET%" --tenant "%AZ_TENANT_ID%" --output none'
|
||||
bat 'az account set --subscription "%AZ_SUB_ID%"'
|
||||
bat 'az webapp stop --resource-group rg-powdercoatinglogix-prod --name linuxpcl'
|
||||
bat 'az webapp deploy --resource-group rg-powdercoatinglogix-prod --name linuxpcl --src-path deploy.zip --type zip --async true'
|
||||
bat 'az webapp restart --resource-group rg-powdercoatinglogix-prod --name linuxpcl'
|
||||
bat 'az webapp start --resource-group rg-powdercoatinglogix-prod --name linuxpcl'
|
||||
bat 'az logout'
|
||||
}
|
||||
}
|
||||
post {
|
||||
failure {
|
||||
withCredentials([azureServicePrincipal(
|
||||
credentialsId: 'azure-pcl',
|
||||
subscriptionIdVariable: 'AZ_SUB_ID',
|
||||
clientIdVariable: 'AZ_CLIENT_ID',
|
||||
clientSecretVariable: 'AZ_CLIENT_SECRET',
|
||||
tenantIdVariable: 'AZ_TENANT_ID'
|
||||
)]) {
|
||||
bat 'az login --service-principal -u "%AZ_CLIENT_ID%" -p "%AZ_CLIENT_SECRET%" --tenant "%AZ_TENANT_ID%" --output none'
|
||||
bat 'az webapp start --resource-group rg-powdercoatinglogix-prod --name linuxpcl'
|
||||
bat 'az logout'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Health Check') {
|
||||
|
||||
Reference in New Issue
Block a user