1

If at all possible, how can one define a custom source for the "Where is your code" selection in Azure DevOps?

A screenshot that displays 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:

  1. You would need to create a custom service connection per repository. This is not sustainable given a large number of repositories.
  2. 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

JoshuaTheMiller
  • 2,582
  • 25
  • 27
  • `other git, any generic git repository`??? – 4c74356b41 Feb 15 '21 at 17:51
  • The problem with that specific option is that one would then need to configure a separate Service Connection per repository (which is not sustainable when one has many, many repositories). Additionally, with "Other Git," you still lose out on some of the niceties of tighter integration (e.g. build status). – JoshuaTheMiller Feb 15 '21 at 17:53
  • thats the best you can get – 4c74356b41 Feb 15 '21 at 17:57
  • Unless there was a way to add custom Sources. Azure DevOps is extremely extensible, so it doesn't seem fully impossible. Unfortunately, I have not found anything stating if this is possible or not (hence the question). I do fear that you are right though ☹ – JoshuaTheMiller Feb 15 '21 at 18:03

1 Answers1

0

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.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • This satisfies the part of my question stating "if at all possible," so thank you! Hopefully one day you, I, or someone will be able to come back to this and add an answer stating how it can be done (once it is possible) – JoshuaTheMiller Feb 17 '21 at 18:22
  • 1
    Feature request can be found via the following URL: https://developercommunity.visualstudio.com/idea/1341115/custom-code-sources-for-azure-devops-pipelines.html – JoshuaTheMiller Feb 17 '21 at 22:20