CI build working but deployment to Azure is not triggered - azure

I created an MVC project using VS 2013 and added it to Visual Studio Team Services. I've also created an Azure website and linked it to the project. I created a CI build profile and the build triggers correctly on check-in. No problems, no errors.
However, the project is not being deployed. There are no errors in the build, and I don't see any way to manually trigger the deployment once the build appears in Visual Studio Online. It seems that everything between Visual Studio and visualstudio.com is working, but the link between the Azure website and VS Team Services is not working. Azure shows no deployments.
Any thoughts on what might be the issue or how I can diagnose the problem?
Thanks

I found the answer, I was using the wrong deployment template in the build profile. I should have been using the AzureContinuousDeployment.11.xaml template

Related

Continuous Deploy node js cloud service project using Visual Studio Team Services

I currently have an Azure Cloud Service within Visual Studio containing simple Node.js web role.
This builds and packages correctly within Visual Studio locally, and deploys perfectly into the Azure cloud service.
When trying to build the solution with Visual Studio Team Services (previously Visual Studio Online), MSBuild fails claiming:
2016-07-01T10:09:56.7893397Z ##[error]C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Windows Azure Tools\2.8\Microsoft.WindowsAzure.targets(1329,5): Error : WAT070 : The referenced assembly C:\a\1\s\CloudTool\Client\Client.exe was not found. Please make sure to build the role project that produces this assembly before building this Microsoft Azure Cloud Service Project.
...which seems to indicate it's expecting the build of the Node.js project to emit an .exe file.
I followed the same steps as mentioned in this article (https://www.visualstudio.com/en-us/docs/release/examples/nodejs/node-to-azure-cloud-service#help-and-support) to continuous deploy node js cloud service project.
When I googled it I found this git hub issue link (https://github.com/Microsoft/nodejstools/issues/428 ) in which no solution mentioned so I want to know this issue resolved or not if yes how can I solve it because I am not able to find any solution.

Deploy Mobile Service (.Net backend) files build from Visual Studio Online build server

Currently our developers deploy our Mobile Service (.Net backend) from Visual Studio 2013 using the Publish Wizard. Occasionally this means that a developer deploys something that either wasn't committed at all or wan't pushed to the origin source control repository. We are already using Visual Studio Online Build servers to do Continuous Integration from the origin server so it would make sense to use the files it builds to do the deployment to remove this risk.
Currently the only way I can see of doing this is to do a "download drop as zip" from the Visual Studio Online build portal and then do a FTP style deployment. This means I lose the web deploy features of only uploading the changes.
I noticed there is a different build template called GitContinousDeploymentTemplate which allows you to specify a Windows Azure Deployment Environment, but this seems to only be applicable for traditional Cloud Services or Web sites.
If anyone knows a good way of doing this any help would be much appreciated.
Cheers
F
From here
Found a solution.
In the build definition's MSBuild arguments, add the following:
/p:DeployOnBuild=true /p:PublishProfile="{publish name}"
/p:AllowUntrustedCertificate=true /p:VisualStudioVersion=12.0
/p:UserName={username} /p:Password={pw}
You can obtain the value from the publishing profile that can be downloaded from the
Mobile Service dashboard on Azure managament portal.
Under Deployment, add the path to pubxml file in source control under "Path to Deployment Settings". Note: add an extra backslash at
the end of the path to escape the last "\".
One problem with this solution is that deployment happens regardless
of your tests outcome, but that could possibly be remedied by
modifying the build template. We used the
GitContinuousDeploymentTemplate template in our case.

Azure Continuous Deployment from Visual Studio Team Services with multiple projects

While using Github (or anything other than Visual Studio Team Services) I can use the following page to customize deployment: https://github.com/projectkudu/kudu/wiki/Customizing-deployments
I'd like to customize my deployment as I currently have both a web app and a web api project. I want the web app to be deployed, as default it deploys the web api project. Using project Kudu the settings (.deployment file or even better, the app settings on Azure itself) works great, but not when you deploy from Visual Studio Team Services.
I've spoken with David Ebbo from Project Kudu, and he explained that VS Team Services doesn't use Kudu at all, but probably MS Build. So my question is, how to specifically deploy the web app.
I managed to change the Build Definition and specify the web app .csproj as the Projects To Build. This works. However, I also want to deploy my web api.
Deploying the web api project with Kudu is easy as I can create a separate website, connect to the some repository (and solution) and specify the Project App setting so that it deploys the correct .csproj. How should we do this for MS Build? When I change the Build Definition, it will always deploy the project specified in there.
Just saw another answer on Stackoverflow that looks to solve this problem: Publish Multiple Projects to Different Locations on Azure Website

Publish Azure Application with MSBuild

Visual Studio 2013 has a publish wizard for Cloud Service projects that packages and deploys a cloud service based on settings persisted in a .azurePubxml file.
I'm setting up automation of this process on a CI server, and want to leverage this functionality within MSBuild, but I'm unsure if it's even possible.
I have found a lot of articles that talk about shelling out to a PowerShell script and using a custom MSBuild target file to do the deploy, but that seems like a duplication of information that I'd rather not delve into.
Given that I have the Azure subscription credentials installed on the build machine, VS 2013, and Azure SDK 2.2, can I invoke the same mechanism that VS 2013 uses in the publish wizard to package and deploy my cloud service?
Currently, using MSBuild with the publish target, I can package the service into a .cspkg file, but I cannot figure out how to trigger to package/deploy based on a profile (.azurePubxml file) that defines the VS build config, and all of the Azure settings.
So, as you pointed out, the default targets will only give you a package. From there, Visual Studio is publishing things using their own infrastructure. Publishing the build from a CI server is considered something external to actual build process and rather something that is part of the deployment process.
If your CI technology has support for PowerShell then it's as easy as automating the Windows Azure PowerShell cmdlets to do your bidding. There's a nicely detailed article on how you might do this with Team Builds in TFS here on MSDN.

How to migrate a VS2012 Azure Cloud Service Project to VS2013

I have two ASP.NET MVC 4 projects created in VS2012. For each, I created an Azure deployment project and they are both deployed successfully to Azure. I got a new dev machine and started fresh with only VS2013 installed, hoping that, as advertised, I wouldn't have to go through the pain of migrations that would make the projects tied to this version. Well, that didn't turn out true, as Azure projects must be upgraded to v2.2 of the Azure .NET tools and API to be opened in VS2013.
On the first project, I installed the 2.2 tools and with a few other relatively minor adjustments, the project works fine. Now, on the second project, however, I can find no way to perform the upgrade. When I opened the project in VS2013, it gave me a migration report saying that the Azure project was incompatible and the only solution offered was to install the 2.2 tools, which of course, has already been installed. I then decided to remove the existing azure deployment project and create a new one as I did before on vs2012, by right-clicking on the web project and choosing "Add Azure deployment project", which wires everything up automatically. Well, that menu item does not appear in the context menu on the web project.
Now, I'm at a loss for how to resolve this, other than installing VS2012 and forego taking advantage of the advances in VS2013. Does anyone have any suggestions how i can get an Azure deployment project working with this project?
(BTW, this is a must, because I am using the azure api to get config items out of the azure config.)
I had the same issue. I solved it by installing the 2013 version of the Azure 2.2 SDK (found here). After doing this I was able to build and run the solution (without any conversion) in both VS2012 and VS2013.
UPDATE:
Try to add a new Azure Cloud Service project to your solution by right-clicking the solution > Add > New Project.
Under templates there should be a section named 'Cloud' with a project template named Windows Azure Cloud Service. When you select this template you should get a dialog where you can add Azure roles to your solution.
If you select ASP.NET web role, a new Web project will be created in your solution. If you don't select anything, you will get an empty Azure project to which you can add your existing MVC project (WebRole Project > Right click Roles > Web role project in solution).

Resources