Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Friday, March 22, 2019 7:42 AM
I've been deploying application to the Azure Web App on Linux via Azure DevOps pipeline. At the end of deploying step I see:
2019-03-21T20:59:55.5613096Z Successfully deployed web package to App Service.
2019-03-21T20:59:56.5626826Z Updating App Service Application settings. Data: {"SCM_COMMAND_IDLE_TIMEOUT":"1800"}
2019-03-21T20:59:57.0274795Z Updated App Service Application settings and Kudu Application settings.
2019-03-21T20:59:58.2392844Z Executing given script on Kudu service.
2019-03-21T21:00:03.6618788Z Standard error from script:
2019-03-21T21:00:03.6685571Z ##[error]/home/site/VSTS_PostDeployment_151553201997029/kuduPostDeploymentScript.sh: 1: /home/site/VSTS_PostDeployment_151553201997029/kuduPostDeploymentScript.sh: Syntax error: "(" unexpected (expecting "then")
2019-03-21T21:00:07.6917960Z ##[error]Error: Unable to run the script on Kudu Service. Error: Error: Executed script returned '2' as return code. Error: /home/site/VSTS_PostDeployment_151553201997029/kuduPostDeploymentScript.sh: 1: /home/site/VSTS_PostDeployment_151553201997029/kuduPostDeploymentScript.sh: Syntax error: "(" unexpected (expecting "then")
After this errors other steps of my pipeline don't execute. Why does this error occur? What can I do to remove this error?
All replies (4)
Friday, March 22, 2019 4:03 PM âś…Answered
The problem was with using default inline post deployment script.
After I refused to use this post deployment actions my problem was solved.
Friday, March 22, 2019 7:44 AM
Looks like the issue can be resolved by converting the script to a unix format. Use the tool like dos2unix and convert the script used and try again
Regards From: Exchange Online | World of Cloud Computing
Friday, March 22, 2019 8:03 AM
I don't manage kuduPostDeploymentScript.sh script. It's not mine. This script included by Microsoft in the task "Azure App Service Deployment"
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/AzureRmWebAppDeploymentV4
I don't know where exactly this script is located and can I change it or no.
Friday, March 22, 2019 8:23 AM
Hi,
You may access the scripts from the KUDU console
https://github.com/projectkudu/kudu/wiki/Kudu-console
Regards From: Exchange Online | World of Cloud Computing