New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Bitbucket Enterprise #128
Comments
I make no claims that this is an authoritative answer, but I do have access to a Bitbucket Server installation. From a Bitbucket server, the URL looks like this when I go to clone a repository: https://username@bitbucket.mycompany.com/scm/projectname/reponame.git Bitbucket has a Learn more about cloning repositories help link that takes you to the Atlassian help for git clone. If you scroll down to the Git URLs heading, it lists the following Git URL protocols:
Specifying the base URL for Bitbucket Server has a little information about the HTTP(S) protocol. Enabling SSH access to Git repositories in Bitbucket Server contains information about setting the SSH base URL. I didn't see anything immediately obvious for the Git protocol. I'm not aware of any URL format differences between Server and Data Center, but I don't have any experience with Bitbucket Data Center. |
Depending on the BitBucket server version the url for the raw file will look different. For bitbucket 4.7 and later the following format is supported BitBucket server versions before 4.7 has the following format We are running bit bucket server 4.14 and running a modified version of the Microsoft.SourceLink.Bitbucket.Git package using the url conversion in the file linked without any issues. |
In our case it is; |
we overcome this issue by updating BuildSourceLinkUrl method in GetSOurceLinkUrl.cs:
but then I found ctaggart/SourceLink#361 pointing that SourceLinkUrl can be used to customised url structure |
But is it possible to use SourceLinkUrl with the dotnet / sourcelink? I’m in the situation that i can’t use ctaggart / sourcelink because our build server is using ssh to our on prem bitbucket server and dotnet / sourcelink bitbucket package generates wrong URL ( for cloud bitbucket ) and SourceLinkUrl parameter in the csproj doesn’t seem to have any effect. |
I was doing some quick research about this entire issue of different urls for Bitbucket Cloud vs Enterprise in specific versions. Right now we have at least three different scenarios:
Implementing BuildSourceLinkUrl method for individual scenario is quite simple. And then use these settings in BuildSourceLinkUrl method the same way Tfs is using VirtualDirectory. The problem is, as soon as I put I would like to contribute to sourcelink project but I am kind of stuck right now. |
@adam-sajdak Thanks for looking into this. Could you send your changes in a PR? |
@adam-sajdak I think you should sign CLA in pull request first? I am waiting for this PR to be merged, thanks for it! |
Please expedite this PR and the subsequent build. It's exactly what we desperately need. |
I think that It is now waiting for @adam-sajdak to sign CLA. Hope he'll sign it soon. |
Implemented by #246 |
Package
Microsoft.SourceLink.Bitbucket.Enterprise
.In order to support on-prem Bitbucket we need a documentation on URL formats it uses for cloning repositories and accessing raw files. Are these the only URL formats? https://github.com/ctaggart/SourceLink/blob/master/SourceLink.Create.CommandLine/BitBucketServerUrlConverter.cs
Is there a difference between Server and Data Center?
The text was updated successfully, but these errors were encountered: