Github.com issues with TFS source control, is it possible? - github

Is it possible to use Github for the issues, TFS for source control, and reference the github issue ids on the TFS checkins?
We use TFS and there's no plan to switch to Git in the near future.
The product owner is out of our network and we can't allow them VPN access so they can't see the issues on TFS.

No, it is not supported to add issues in Github when check in code at TFS. It could only add workitems in TFS.
If they couldn't see those workitem, you could export those workitems from TFS to Excel and send to them. Or like Daniel said in the comment, you could use VSTS instead of using TFS.

Related

Adding a custom "Where is your code" source

If at all possible, how can one define a custom source for the "Where is your code" selection in Azure DevOps?
Purely for example, say I wanted to use GitLab as my source. Given that no current extensions exist in the marketplace that do this, how could someone go about defining one that adds a custom source for Azure DevOps Pipelines?
While it is true that one could store the pipeline definition in one location and use a "checkout" task to clone the code itself, such a technique causes some functionality to be lost (build status reporting, for example).
Additionally, while using "Other Git" allows one to connect to any git repository, it has its own issues:
You would need to create a custom service connection per repository. This is not sustainable given a large number of repositories.
You still will have the issues found when storing the pipeline definition in one place and checking out a specific repository: loss of build status reporting, PR/merge decoration, etc.
I have looked around Microsoft's documentation websites, as well as the various repositories like the Azure DevOps Task Lib, but I have not found anything that even states if this is possible.
Update Feb 17, 2020
As per the answer below, this is not possible today (Feb 17, 2021). I have opened a corresponding User Voice idea: Custom code sources for Azure DevOps Pipelines
how can one define a custom source for the "Where is your code"
selection in Azure DevOps
For this issue, I am afraid that this is currently not possible in azure devops. If you want to select a custom code source for the pipeline, then you cannot avoid creating gitlab service connections. Currently azure devops only provides the option "Other Git" to choose from.
As a workaround , you can try to create repository mirror​​​ing. Repository mirroring allows for mirroring of repositories to and from external sources. It can be used to mirror branches, tags, and commits between repositories.
Push: for mirroring a GitLab repository to another location.
In addition, you could add your request for this feature on our UserVoice site , which is our main forum for product suggestions.After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.

TFS 2015 Project Wiki vs Code Wiki

We are using TFS 2015 On Premise, not in the cloud and I am trying to give access to Stakeholders so they can access the wiki. However, as a stakeholder I keep getting this error:
TF400409: You do not have licensing rights to access this feature: Code
After researching the error it seems to be related to the fact that Stakeholders do not have access to view Code Wikis as shown here. That link is for Azure DevOps and I am not sure if it applies to my case but I cannot find anything else so my assumption is it does apply. Even links within our TFS site, takes us to Azure DevOps for help and thus my assumption is it applies to us as well.
Here is a screenshot from the aforementioned link:
Question
What is the difference between Code Wikis and Project Wikis? It seems I need Project Wikis but how do I create a Project Wiki?
Thanks in advance!
Code Wiki are not available on TFS server 2015. You need to use version TFS 2018 or above for this.
Project Wiki
Every team project can have a wiki. Use the wiki to share information
with your team to understand and contribute to your project.
Each team project wiki is powered by a Git repository in the back-end.
When you create a team project, a Wiki Git repo is not created by
default. Provision a Git repository to store your wiki Markdown files,
or publish existing Markdown files from a Git repository to a wiki.
In the project page, you could directly choose to create project wiki.
Code Wiki
Content that you already maintain in a Git repository can be published to a wiki. For example, this could be content written to
support a software development kit (SDK), product documentation, or
README file. You can publish multiple wikis within a single team
project.
More details about the difference of them, kindly refer our official doc here:
Provisioned wikis vs. published code as a wiki
As how to use them in Azure DevOps/TFS, you could also take a look at this step by step tutorial -- Collaborating using Azure DevOps Wiki

VSTS reporting capabilities

We're looking at moving from TFS to VSTS. However, one of the features I rely on is the ability to see which developers have got code checked out, when it's getting checked in, and to which branch. I need to see this at the collection level, not per project. Does this functionality exist in VSTS?
Tks
No such built-in features in Azure DevOps (VSTS).
However you can try below workarounds:
To see which developers have got code checked out, you can use the
tool Team Foundation Sidekicks which can retrieve the status
locked/checked out by other users. But the latest version is Version 6.0 only for Visual Studio 2015. Based on my test it's also available for VSTS. Please reference my answers in below threads:
Is there a way in Visual Studio and TFS to view items checked out to local workspaces?
List of checked out files
For when it's getting checked in, and to which branch, you have to
navigate to the specific repository to check the changesets which
include the history. You can also try calling the REST API
(Changesets - Get) to get the information.

How do I move an Azure DevOps project to a different organization?

I have got a project in an old org (from VSTS), that I want to move to my new one.
I can't see any options in Azure DevOps on migrating projects, or any information on the interwebs.
Anyone know how to do it?
If you just need to move repos, you can use the built in clone functions:
Go to the Azure Devops source repo -> Files
Click "Clone"
Choose "Generate Git Credentials"
Create the target repo in the target Azure DevOps
Choose "Import a repository"
Use the URL and credentials from Step 3
Done
This is not supported today. But this feature was planned to develop: make it possible to move a Team Project between Team Project Collections
If your Azure Devops project only tracks code versions using a single Git repo, hence no boards, user stories, tasks, pipelines, etc. then you can do the following:
Clone your project repo.
For example with Visual Studio.
You don't need to clone if you already have a local repo.
Destroy the association with the remote.
For this typically, you need to open a command line prompt in the folder that contains the .git database folder, most likely the solution folder of Visual Studio and type git remote rm origin.
Here is an example using git bash showing the content of the solution folder, including the .git database and the *.sln Visual Studio solution file:
Open the solution with Visual Studio if not already done.
It should now show that you have many commits waiting to be pushed to a remote. For illustration purpose, my toy project only have 8 commits in total.
Click the up arrow and choose your new remote, say a brand new Azure DevOps project, in the organization of your choice, then push.
You are now done cloning the project in another organization. If needed, then destroy the project in the old organization to complete the "move" operation.
There are 3 projects that I know of to achieve this.
A paid for option by Ops Hub -
OpsHub Visual Studio Migration Utility
An open source tool that requires making changes to the work item process template - Azure DevOps Migration tools
An lastly an Unofficial but still written by Microsoft tool to create Azure DevOps project templates - Azure DevOps Demo Generator & extractor tool
With the last one (the Demo Generator) you extract the project as a template, then apply it to the new organisation. As it is a tool for demo's there is no support provided and in my experience it works for simple projects but falls over on anything complex.
Expanding on others' answers, this post regards Pipelines.
Azure DevOps API
Migrating nearly all aspects of a project across organizations is doable, but it is a lot of manual work using the Azure DevOps API. The link below shows you all the end points, variables, etc. From there you'll probably want to write a Power Shell script and do a couple test runs to a dummy Organization.
https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-6.1&viewFallbackFrom=azure-devops-rest-6.0
In App options
If you avoid the API, there is no way to migrate pipelines that preserve build or release history, but you can preserve your configurations and processes by going into your Pipelines and selecting View YAML. From here you can either take this away as notes to recreate the GUI steps in your new org/project location, or actually adopt the YAML standard in your git repository.
I do not believe there is a way to migrate pipeline variables outside of the API. However, you can move the variables to Azure Key Vault and change your pipeline settings (YAML) to reference values from key vault. This is not a large amount of effort and is a nice process improvement.
Lastly, if you have any locally installed pipeline agents for releases, you will need to run the Power Shell script for your new organization on the boxes. Very simple 5m step, but right now the Agent Pools are not sharable across organization.
As #Frederic mentioned in his answer, we can actually easily do it with Visual Studio. I have done this without Visual Studio. The steps involved are below.
Add a User to Both Organization
Configure SSH Key
Update the SSH Key in Source DevOps and Clone the Repository
Check out all the Branches and Tags
Update the SSH Key in the Destination DevOps
Remove Old and Add New Origin
Push all the branches
The commands and detailed explanations can be found here.
BTW, if you need to change the entire Devops Organization tied to your personal Tenant (E.g. VS Enterprise Subscription) and move it to new Tenant, you can change the AAD and point it to the new one e.g. your EA Tenant on Azure commercial cloud.
Before you switch your organization directory, make sure the following statements are true:
You're in the Project Collection Administrator group for the
organization.
You're a member or a guest in the source Azure AD and a
member in the destination Azure AD
You have 100 or fewer users in
your source organization. Otherwise you will have to open a support ticket.
You may have to add the users back in destination org if they do not exist becuase they will loose access the moment you switch the AAD.
you could just download as a zip file and then download it to the destination repo

Migrate TFVC repository from one VSTS instance to another VSTS instance

I need to move, or copy, a TFVC (Team Foundation Version Control) repository from one instance of VSTS (e.g.: source.visualstudio.com) to another instance of VSTS (e.g.: destination.visualstudio.com).
I thought this would fairly straightforward, but I can only find information in regards to TFS (Team Foundation Server), not VSTS (Visual Studio Team Services). Or samples that convert to a Git repository, while I need to go from TFVC to TFVC.
I am not interested in migrating Work Items at this time, just the source code and its history.
No built-in tool to do it, there is a similar user voice: make it possible to move a Team Project between Team Project Collections
Regarding 3rd tool, you can try it with OpsHub Visual Studio Online Migration Utility.
On the other hand, you may change account owner of VSTS if just need to change owner.