Azure can't find my TFS repositories - azure

I have created a new app service on Azure, that i want to connect to an existing project on my TFS.
The problem is, when i choose Continuous Delivery -> Source and selects Visual Studio Team Service and selects the correct project, it says that there is "No repositories found".
What am i missing?
And as you can see, there should be a repository:

It looks to me like you are following the instruction for the new CD services that support Git only: https://www.visualstudio.com/en-us/docs/release/examples/azure/continuous-to-app-service
If you are still using TFVC you may need to follow the old 2013 instructions: https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-continuous-delivery-use-vso
If you want to move to Git to take advantage of this and other features then you can migrate using the Git-TFS tools on GitHub. Or even better, you can start from scratch and ditch binaries...

Related

Source code migration from TFS 2013 to Azure Devops service

Please suggest if someone has experience of migrating source code of 3-4 applications (including their dev, stage & production environment) from TFS to Azure Devops into Git repository & then build the CI/CD pipeline. We don't require work items or history to be migrated.
Can someone give high level steps & what would be approach for migration?
On premise TFS service is TFS 2013 & source code is to be migrated to Azure Devops services. Currently they are using TFVC. Also these are .net applications. One of the application is having around 9.5 GB of data to be migrated. Kindly advice the process and tools which could help with code migration.
Since you are working on TFVC, you need to use a third-party tool GIT-TFS.
The Git-TFS tool is a two-way bridge between Team Foundation Version Control and Git, and can be used to perform a migration. Git-TFS is appropriate if you want to attempt a migration with full history, more than the 180 days that the Import tool supports, or if you want to attempt a migration that includes multiple branches and merge relationships.
You simply need to go through the following five steps to migrate your TFCV repo to Git.
Step 1: Install git-tfs. There are multiple tools to migrate from
TFVC to Git. ...
Step 2: Export to local Git Repo. ...
Step 3: Cleanup New Git Repository. ...
Step 4: Create new Git Repo in TFS. ...
Step 5: Initial Commit to Git Repo.
More details please take a look at this blog-- Migrate From TFVC To Git – 5 Simple Steps

Deploying azure webjob via git

I have a solution containing a .net mvc website, and a webjob.
I deploy using git - so on git push to azure, my website is upgraded. I'm now just adding a console application that is going to be run on a schedule. I'm trying to work out how to deploy this with the website when I git push, but I'm not sure how to do this.
I know I could create a folder website\app_data\jobs\triggered\webjob and copy the files into there (say from a post-build event on the webjob), but that would mean I would need to commit all those files to the git repo for the deploy to pick them up - which would also mean that every time I build, Git would be prompting me to commit them again - ugh.
Is there a nicer way to do this - where I can just push my repo to azure, and it will deploy my website correctly AND my webjob?
Thanks
Yes, you can do this without having to put the actual EXE's and project output into the folder explicitly. This blog post from the Azure Blog documents the workaround to enable Git or command-line deployment of a web application inclusive with WebJobs.
http://azure.microsoft.com/blog/2014/08/18/enabling-command-line-or-continuous-delivery-of-azure-webjobs/
If this doesn't unblock you please post an update and I'll help walk diagnose any other issues you run into. You may also want to update the WebJob publishing NuGet to the most updated one on NuGet here: https://www.nuget.org/packages/Microsoft.Web.WebJobs.Publish/1.0.2
As of 9/15/2015, this appears to be as simple as some context menus inside Visual Studio.
If you want your WebJob to automatically deploy whenever your Website is deployed, in Visual Studio you can right-click on the Website and select "Add->Existing Project as Azure WebJob".
More details here, in particular the "Enable automatic WebJobs deployment with a web project" section.
I was struggling with this, but I've got it working now.
It appears that WebJobs.Publish 1.0.2 must be used. 1.0.1 was not working for me. Worked as soon as I updated.
I had also tried adding webjobs.props files as indicated here by David Ebbo, but that didn't work for 1.0.1 and I've now removed those files and it's working under 1.0.2 without them.
Using WebJobs.Publish creates a webjob-publish-settings.json (in the webjob project) and a webjobs-list.json (in the MVC app) and that would seem to be all that is needed.
Only thing that does not work is creating the schedule for a scheduled job. Continuous and Triggered jobs deploy just fine. There's a thread here where David Ebbo mentions that this is a current limitation.

TFS copy build output to source control

I have been working with a TFS project that supports copying build output to source control. If I open the build definition, this is under "Build Defaults". There is an option to copy build output to a source control folder.
I have just installed TFS Server 2013 (with update 2) and I want to use this feature with a new Team Project. However, if I create new build in VS 2012 or VS 2013 on the new server, I am not given the option to copy build output to source control. What gives?
I am not looking for a workaround, I want to know what to change so that my server acts like the first one I described. Thanks!
Screenshots of what I'm talking about: http://imgur.com/a/mhDNQ
This was a feature that was temporarily present in TFS, but I believe has since been removed. If I recall it was put in there specifically to support the cloud-hosted elastic build servers which didn't have access to network shares to drop the builds in.
Most people recommend against putting your build outputs into TFS. The best approach is to publish them to a NuGet feed.
In any case if you want to put your build outputs into TFS (or a NuGet feed) you'll have to modify the build workflow to do that yourself.
Open a new build definition > process.
Under template select new and you should be able to choose project and folder. Find your original template and link it. Your option should appear.
In TFS 2013 this has changed to be "store drops in TFS". When you select this option the drop I'd stored in a new inversioned store that you can access.
While you can easily get the files out as indecision or zips the built in tools like release management do not support it yet. I would recommend that you use this option but publish your assets to a nugget repository.
If your TFS is available online (VSO or https) then you can use MyGet to dynamically load the nugget packages that you are publish and make them available on a feed.
http://docs.myget.org/docs/how-to/use-tfs-online-git-with-myget-build-services

TFS: Automated publish a folder to Azure website

I am trying to create automated build to publish a folder with files onto Azure web-site. And I cannot accomplish this.
I am NOT publishing a solution (.sln), but rather a folder with files. I am using VS2013 and Visual Studio Online.
I have experience with TFS web publishing, so I published solutions many times.
So, what I did so far:
Created an MSBuild build.xml file that just copies files from the folder to the output.
Created a build definition based on AzureContinuousDeployment.11.xaml
Specified build.xml in my build definition, Process tab, in "Solution to build" parameter:
If I build my project, it is correctly built, files are copied to the output, etc (I can verify it by opening drop location, all files are there).
Then, I:
Created a web-site in Azure, linked it to my TFS subscription.
Downloaded a publish profile (.PublishSettings from a web-site).
Created a Web publish profile (.pubxml) in Visual Studio based on .PublishSettings file).
Specified Web Deploy Publish Profile and Deployment Settings Name:
But now I am getting an error during build:
Exception Message: Please specify a Visual Studio Solution (.sln) to build. (type BuildFromSolutionException)
So it asks me for a Visual Studio solution, but earlier it worked perfectly with MSBuild file (after step 3).
I tried to rename my .xml to .sln (probably it is not what I should have done), and build now says "There was no Windows Azure project (.ccproj) detected in the solution. Continuous delivery to an Azure Cloud Service requires an Azure project. (type CCProjNotFoundException)"
If I don't specify "Deployment Settings Name", build completes without errors, but again no publishing to Azure.
So, the question is, how to publish a custom MSBuild build, without a solution, onto Azure? Is TFS continuous Azure publishing for Solutions only? I expect it to be agile, like I published folders from Local Git to Web-site without any hassle.
What should I do?
There are a few confused ideas in your question. Fits, there is no relationship between and automated build and Git. You are using Team Foundation Build to run the workflow of deployment. It is the workflow that is not working for you. In effect the build and deployment script. In fact the script you are using works with both Git and TFVC so that is not the issue.
That specific script is designed specifically for building an azure project that is then continuously delivers to Azure and you likley can't use it as you are. You can however create another script and use that. I would suggest you try instead to use the Default build script and use a powershell script within the build to collect the files and then push them to Azure.
If you want to go a little more advanced you could create a copy of the default and make one that does not require MSBuild at all.

Can I automatically update a live site after each commit using TFVC and Azure?

For each commit I want to have a live version with the committed code using TFVC and Windows Azure.
If a developer commits something I want to be able to test it on dev.mysite.com. How can I setup this using azure and TFVC?
See below URLs for details on how to do that:
http://www.visualstudio.com/en-us/get-started/deploy-to-azure-vs -- Easier option
http://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/

Resources