How to publicly share a Visual Studio Online Repository? - tfs

I was wondering if there was a way I could share my repository on VSO publicly? I use TFVC in Visual Studio, but I'll admit I'm new at it so I'm not really sure how to go about doing nor the steps to take to do it.

UPDATE 2018-05-10 There is now limited public preview of Public projects in VSTS
Join: https://blogs.msdn.microsoft.com/devops/2018/04/27/vsts-public-projects-limited-preview/
I have joined and have made one of my projects public. There are still significant limitations in its capabilities and the current goal is to enable folks using GitHub for Issues and Code to now use VSTS for CI/CD.
Example: https://nkdagility.visualstudio.com/vsts-sync-migration
While VSTS Public projects are still limited in capability you can still push your code to GitHub
You can use the https://marketplace.visualstudio.com/items?itemName=nkdagility.gittasks build tasks from the marketplace to publish/push your code to GitHub to make it public.
I do this with all of my Open Source projects so that i can use VSTS as primary and just post to GitHub. Even works to bring pull requests in from GitHub.
Example: https://github.com/nkdAgility/vsts-sync-migration

Related

Configure a backup schedule for Git version control with VSTS

I found articles on GIT back up and restore but I did not find any on Microsoft TFS Scheduled backup for GIT version control.
This document describes on how TFS's traditional versioning can be scheduled for automatic back up. Configure a backup schedule and plan for Team Foundation Server
However, I did not find any link where I can read that "GIT repository is also included in schedule". I am not a TFS expert and I do not have access to TFS server to verify in person. So any help is appreciated.
The tutorial you are refer which is Scheduled Backups tool. It' a build-in tool on the Scheduled Backups page in the TFS Administration console.
It' the whole database back up not only referring to source control, but also work items, pull requests, builds, test plans or anything else that the service offers.
As a limitation, you need both an administrator for TFS and a member of the SQL Server System Administrators group.
And no need to to verify in person, it's under SQL server, when you want to use the backup, just restore the database.
If you are actually using the online VSTS . For now there is no build-in tool and got a uservoice:
Provide a backup service for Visual Studio Team Services
https://visualstudio.uservoice.com/forums/330519-visual-studio-team-services/suggestions/5339461-provide-a-backup-service-for-visual-studio-team-se
However if you just want a git repository(source code) back up, you could use some 3rd-party tool to achieve this:
We use the VSO Rest API to query our VSO account and get all the data
we need. Since in VSO you can only have one Team Project Collection,
we retrieve all the team projects of the default collection. Each of
these team projects can have multiple repositories that need to be
backed up. A folder is created for each team project and saved to a
location on disk that can be configured in the app.config. When the
team project folder is created, the task loops over each repository in
the team project and creates folders for each repository.
Source Link
You can also fork it on GitHub here. Certainly, you should also be able to use this for on-premise TFS also use the API, just need to change some part.
TFS is implemented the way to keep Git repositories in the SQL Server database, too. Thus, when you follow the instructions from the article you reference, the source code will also be included in the backup, no difference whether it is TFVC or Git.

Ceate repository for android on tfs

I want to upload android source code on TFS using visual studio and my server side is written using C#
how to create repository for android on TFS
UPDATE1:
Please read Get Started documents first:
Get Started with Git and Team Services
Get Started with TFVC
UPDATE2:
If you just want to isolate the documents from the source code, you can create a new folder under the project, or create a new branch to store the documents, of cause you can create another repository, it's based on your requirements. Please see this article for details.
Do you have any special requirements? If not, nothing different with other projects. Assuming you are using TFVC, just try following below steps:
Connect from Visual Studio or Team Explorer
Create a team project
Add repositories
Configure your workspace and check in the source files/changes.
You can create the repository individually for client and server projects as needed.
If you just want to upload the existing source code to TFS, you just need to Put an existing solution under version control
Please see the overview documents for more information.
If you are using Android Studio, you can install the Team Services Plugin for Android Studio with Git repositories used. See here fro more info.

Migrating a build definition from TFS to VSTS

I've been tasked with migrating a build from TFS to VSTS, I've used TFS from a developer point of view, however I've never created builds. Can anyone give me any advice where to start, good websites, tutorials, tools that might help, anything that might catch me out etc, basically my knowledge on this is very limited so anything would help. I've no doubt there must be somebody out there who can say we've done this, here is what we did...the new VSTS build will need to be a copy of the TFS build however some analysis needs to be done as the build process is old and certain parts may not be necessary. Thanks in advance!
Migrate New Vnext build definition from TFS to VSTS
If you want to template your builds or move them from TFS to VSTS, you could also use the REST API's to perform this. Details please refer this blog: HOW TO MOVE BUILD DEFINITIONS IN TFS TO OTHER PROJECTS USING THE REST API
Another example shown here. It shows how to get the JSON response of a build definition and again using the same reference to make a new one in the project you desire.
Migrate Old XAML to New Vnext build definition from TFS to VSTS
Unfortunately, there will not be any automated conversion processes. The new builds are based on a different architecture and run on a completely different system. And you can use both the new builds and agents alongside your XAML builds, controllers, and agents.
If you have heavily customized XAML builds and custom activities, you
can continue using those builds until you are ready to port your
business logic into scripts that can run in the new builds.
You should also take a look at these series of articles by jessehouwing devoted specifically to the case like yours.
About how to create a build, you could refer this tutorial from MSDN.

using both Visual Studio Team Services and Codeplex for repository

I started a utilities project in Visual Studio Team Services where you could have multiple developers on a project, but ended up not needing the extra developers, but still liked the Visual Studio Team Services interfaces. I wanted to be able to share some of the projects I do to people that read my blog, but found out after I was using it for a while that I could not give access to the public (or at least I couldn't find away). I know Codeplex allows you to do this since it is specifically for open source projects.
Is there any way to keep the Visual Studio Team Services and the TFS on Codeplex in sync so I can work from one source control primarily? or even better, is there a way to publicly share by URL stuff you work on Visual Studio Team Services?
There is not currently a way to share any Team Services content publicly.
However, if you use Git as your VCS in Team Services you can easily add two Origins and push to both with "git push -all".
If your codeplex repo is also git you can easily share.

Where can I get large sample TFS repositories?

I'm building a tool to integrate with TFS and it needs to properly parse TFS logs (from the tf.exe history command) and checkout different revisions (again using tf.exe). It works great on the test TFS server I have, but I want to test it on a broad range of large repositories to make sure my parsing works properly.
I'd hoped to use Codeplex to get access to TFS repositories, but it seems you only get TFS access to Codeplex projects if you're a project member.
Are there any collections of open source code hosted on public TFS servers? Are there any other publicly available servers I could use for testing?
I would suggest using svn2tfs and choose any relatively active project on SourceForge. There are plenty of projects on SF to choose from that use SVN and not CVS. You might even get a bonus out of it and help the svn2tfs project work out any kinks.
Since you mention tf history command, I assume you want to collect/parse logs on the project's (and its files) history of checkins.
So in addition to large repository, you also need a good amount of history, am I right? If yes, then here's your set of problems:
Most projects on codeplex use Mercurial, not TFS. So even if you get access, you cannot use TFS with them.
As you mentioned, they require you to a be a member for you to access the source.
Even if you get access or find a public server (unlikely), you still would need good amount of history.
If I'm correct in my assumptions so far, here's the easiest (bit tedious though) way out:
Go to any large projects's such as Nuget or Wix
revisions
Download any old revision (go back as far as you want the history for). You can download zipped src files without being a member.
In your test server, checkin the code (src) to create the baseline.
Download the next revision.
Checkout files in your server and overwrite them with the newer revision's files.
While checkin, use the history.txt (sample) to create checkin comments
Repeat this process few times.
Voila!! You now have a large repository with lot of history!
Hope this helps.
Have you tried some of the larger projects on Codeplex?
http://www.codeplex.com
If you only need read access you should be able to play around with the various repositories.
I don't have a huge amount of tfs experience, but I would assume there are migration tools that let you ingest code repositories from other products (e.g svn or hit).
If so, you might want to find a svn/git repo for a sizable foss project, and try importing that.
"I'd hoped to use Codeplex to get access to TFS repositories, but it seems you only get TFS access to Codeplex projects if you're a project member."
This solution appears to be the general consensus amoung SO'rs. I've read some of the Codeplex TFS connection problem threads (you linked to below) and I hope the comments in this thread resolves the issue:
Connecting to Codeplex TFS as a Coordinator or Developer.
I'm wondering if you can use git-tfs project to import an existing Git project into TFS.
Download and install git-tfs
Create a new TFS project
Clone the TFS project to a Git project using git-tfs ("git tfs clone http://tfs:8080/tfs/DefaultCollection $/some_project")
Import a existing Git project of your choice into your fresh new Git project (I don't know the command but I think it's possible).
Use git-tfs to checkin to TFS Server ("git tfs checkintool")
=> Do it makes sense ? And works ?
For more information:
http://lostechies.com/jimmybogard/2011/09/20/git-workflows-with-git-tfs/

Resources