I have problem with deployment from bitbucket repository into Azure App Service website. Changes on master branch are showed in kudu but not displayed on website. I've figured out possible problem.
Deployed changes from git repository are being added to client folder, but App Service is probably pointing to /wwwroot/ folder which was updated 2 days ago, that's why I dont see deployed changes. Does anyone have solution on how to fix this?
Related
I checked to see if my files exist in wwwroot and this is what it showed:
I don't know how to get my files here.
Any advice?
If you are using windows plan after deployed to azure you need to git clone your repo after you've initialized your local Git repo on the Azure Web App.
After created the Web app in azure you need to set a continuous deployment.
Clone your deployed web app by using the url
git clone <your_url_convert_to_clone>
Your every change, git add., git commit, and git push them back to the repo in Azure to see your changes there.
Refer here
If you are using linux app service please have a look here
Two weeks ago I created 2 App Services, one is a Function App and the other is a PHP website... after having them created, I went to Deployment Center and configured this option to pull the code from an Azure GIT Repo and build & deploy the code using Kudu, everything was working as expected, whenever I made a code change and pushed it, Kudu was taking the latest commit, building and deploying the latest version...
Yesterday it stopped getting the latest commits from the Repo and by the time I tried to re-configure the setup to see if that helps it won't event display the commits anymore.
Here some screenshots showing the Web App and it's continuous deployment setup mapped to the Azure GIT Repo:
WebApp Continuous Deployment Setup
Azure Repo
Does anyone have faced this issue before? What could be potentially causing this situation? Could any quota limit be causing it?
NOTE: I have a Pay-as-you-go subscription.
Short version: How can I deploy a new version without first manually stopping the app-service?
Long version:
I'm using the following workflow to publish a new version of my ASP.NET Core app to an Azure App-Service.
The App-Service is running on a basic instance. I understand this is not intended for real use but I hope there is a good way to get this workflow running before we go into production(standard instance).
This works but how can I avoid step 4 to 7?
Publish the solution into a local folder.
Move the published content into a local git repo.
Commit all files and push to the app-service.
Stop the app-service from the portal
Enter the console and delete all files in the wwwroot folder
Redeploy the commit from the portal
Start the app-service
I was hoping that the push in step 3 would automatically trigger the remaining steps.
After step 3 I can see that the files have been updated, the new static files are served to the browser but the old binary is still running.
Similarly I can switch between deployment slots on the portal. I get the new static files served but the previous deployed binary is still answering all calls.
This doesn't work, the static files are changed but the old binary is still responding to calls.
Redeploy from portal
Restart app-service
The old binary is still served.
This works.
Stop app-service
Deploy from portal
Start app-service
It appears the running binary is blocking the deployment.
How can I automate deployment using git push or from the portal without manually having to stop the service?
Application settings:
You need to enable msdeploy flag MSDEPLOY_RENAME_LOCKED_FILES=1 in Azure App Service application settings. The option if set enables msdeploy to rename locked files that are locked during app deployment
Click application settings and scroll down until you see app settings.
set this key: MSDEPLOY_RENAME_LOCKED_FILES and for its value put 1
How can I deploy a new version without first manually stopping the app-service?
When I develop my .Net Core Web application via VS, I would leverage the publish wizard, check the option Remove additional files at destination and use the App offline support by setting EnableMSDeployAppOffline to true under the publish profile for publishing my application to Azure Web App.
Based on your current deployment workflow, I assume that you are using the Continuous Deployment to your Azure App Service with your local Git Repository. After I changed the source code, then commit the changes to the local repository, then push the source code to my web app remote repository, the source code would be built and copied to D:\home\site\wwwroot on Azure side. Details you could follow Local Git Deployment to Azure App Service.
For your step 1 to 3, I just push the code changes from the local repository to my app service remote repository. Azure would generate the deployment script for you to build your source code project and move the built content to D:\home\site\wwwroot. Moreover, you could Custom Deployment Script for your additional requirement.
I have a new version of my web app and after a new deployment from a new Bitbucket repo the old version is still served. I've deleted the App Service and then created it again, but still the old stuff is served. Everything I've tried results in a successful deployment of the new code, but when I browse the site, the old version is served. To get rid of the old code can I go to the console and just delete everything in site/wwwroot? Is there a git repo in Azure I can initialize?
According to your description, I assumed that you are using continuous deployment for your Azure App Service app. AFAIK, for basic web site deployment, azure would clone your Bitbucket repo to D:\home\site\repository, then restore packages or compile your project, then deploy your project to D:\home\site\wwwroot.
As David commented that you could leverage KUDU or ftp tool (e.g. FileZilla) to check your files under site\wwwroot and site\repository, and compare with your Bitbucket repo to make sure your source code has been synced into site\repository.
Also, you could try to delete site\wwwroot and site\repository via KUDU, then Disconnect and set your continuous deployment again on Azure portal to isolate this issue.
I'm deploying to Azure sites using GitHub, but for some reason I'm not seeing any files insidre the wwwroot folder. It seems like the deployment is not going thur. I do see the files inside the repository folder.
You don't specify what you have done in setting up the deployment. However, the following is what has worked for me:
Set the Azure Website for Git Deployment via the following instructions:
http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-git/
Create a GitHub repository
Initialize your local working folder in Git. Push to the repo. By the sounds of things, you have done this.
Then you need to make sure you link your Azure Website with your GitHub repo. In the Portal, go to the 'Deployments' section of your Azure Website and click:
If you are logged into GitHub in the same browser it will quickly ask you to specify the correct repository and that'll be it.
This is the step I suspect you either may not have done completely, or perhaps you have selected the wrong repository.
Once it is hooked up, Azure will pull and deploy each time you push a commit to the master branch in the repository.