0

I'm having real trouble deploying my Microsoft teams app to azure. I've been using the local. I believe I've set up the local git correctly and the error message being returned post deployment is "Error - Changes committed to remote repository but deployment to website failed."

And i managed to extract this from the logs...

2019-09-02T13:19:15.053Z - Updating branch 'master'.
2019-09-02T13:19:16.415Z - Updating submodules.
2019-09-02T13:19:16.549Z - Preparing deployment for commit id '401185b3e6'.
2019-09-02T13:19:16.867Z - Running custom deployment command...
2019-09-02T13:19:16.950Z - Not setting execute permissions for deploy.cmd
2019-09-02T13:19:17.032Z - Running deployment command...
2019-09-02T13:19:17.055Z - Command: deploy.cmd
2019-09-02T13:19:18.030Z - /opt/Kudu/bin/Scripts/starter.sh: line 2: exec: deploy.cmd: not found
2019-09-02T13:19:18.093Z - /opt/Kudu/bin/Scripts/starter.sh: line 2: exec: deploy.cmd: not found\n/opt/Kudu/bin/Scripts/starter.sh deploy.cmd
2019-09-02T13:19:18.570Z - App container will begin restart within 10 seconds.

I've been trying to follow these instructions

https://learn.microsoft.com/en-us/azure/app-service/deploy-local-git

Everything seems to be working as expected up until the Deploy the Web App step. The previous step to this return a url to the Azzure CLI that end with scm.azurewebsites.net. However it when i follow the step immediately after as instructed it's expecting a URL to a git file and produces the following error...

fatal: Not a git repository (or any of the parent directories): .git

Unfortunately because this walk-through requires me to show web app credentials and URLs I cant share exact details of each step in powershell. I should add though on step one I am including the web app in the user name like so....

<webapp>/<username>

If I dont then PowerShell returns the following error...

az webapp deployment user set: error: argument --user-name: expected one argument
Wajeed Shaikh
  • 3,078
  • 1
  • 23
  • 30
andy moore
  • 89
  • 2
  • 11
  • Could you please follow [Azure Cloud Shell Script](https://learn.microsoft.com/en-us/azure/app-service/scripts/cli-deploy-staging-environment#sample-script)steps and let us know if you face difficulties in it? After you deploy code Azure will give you a URI which you need to update in the project. – Trinetra-MSFT Sep 03 '19 at 08:15
  • Thank you fore you response to this Trinetra. I will be returning to this issue but for the purpose of the early prototype I'm building I've decided to switch to an SPFX webpart rather than node app to act as my teams application tab so I'll give this a try in a week or two once I'm back on the full build. – andy moore Sep 05 '19 at 10:04
  • Thanks, Let me know when you are up for this. – Trinetra-MSFT Sep 05 '19 at 11:13

1 Answers1

1

I believe I caused the problems by including the node_modules in my inital attempts to upload the app. This was causing time outs in both FTP and GIT. In the end I used the following approach to deploy my app.

  1. Connect to FTP using filezilla.
  2. Upload files excluding the node_modules folder.
  3. Login into the webapp SSH from Azure and do a $npm install from the SSH CLI.
  4. Restart the web app from the azure web app portal page.
andy moore
  • 89
  • 2
  • 11