I have an Azure App Service which is protected via private end point and network is disabled. Also it has a custom domain which is just in company network reachable, also inside of devops agent.
I have a CICD agent which in last step "Deploy" I am facing an issue:
$ az webapp deploy --name $AZ_APP_NAME --resource-group $AZ_APP_RESOURCE_GROUP --src-path artifacts/app.zip --type zip --enable-kudu-warmup false
WARNING: Initiating deployment
WARNING: Deploying from local path: artifacts/app.zip
ERROR: The command failed with an unexpected error. Here is the traceback:
ERROR: HTTPSConnectionPool(host='[MASKED].scm.azurewebsites.net', port=443): Max retries exceeded with url: /api/publish?type=zip (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x783bf07aede0>: Failed to resolve '[MASKED].scm.azurewebsites.net' ([Errno -2] Name or service not known)"))
I have custom Kudu (SCM) URL: myapp.scm.mycompanydomain.com But the deploy command is calling the original url, which couldn't be accessed.
What is the solution is this case?
It should be available to set custom domain for SCM or another workaround.
OK, that was my mistake! I've forgot to set private point dns in devops agent!
10.106.99.15 app-xxx-yada.scm.azurewebsites.net
10.106.99.15 app-xxx-yada.azurewebsites.net