Status: Closed (View Workflow)
Jenkins 2.89, Windows
When filling the "Configure Repository Browser" in a multibranch pipeline Git section, or in a regular freestyle job, one option is "Fisheye".
However, the URL format is not specified nor hinted. I initially typed http://fisheye.ourdomain.fr, which led to broken links. The correct format was http://fisheye.ourdomain.fr/browse/repoName/
The point is that it is not explicitly documented: Not in the configuration page, not on the plugin page, and I did a bit of googling, to no avail.
I had to open the source code (FisheyeGitRepositoryBrowser.java) to find it, thankfully commented. The source seems to try a validation, maybe it's broken?
- is related to
JENKINS-48625 Several git repo browser URL formats are not checked or documented
- links to
Ok, I'll try to find some clues, I'll list my findings here.
First, the validation seems to fail on the majority of SCM browsers (the validation does not leave the browser, so I'll assume the binding with the form validation thingy is KO).
Gitlab's version check is OK, so I'll try to find what differs!
My guess is that the field is not named the same in the view and in the check method:
In the Gitlab browser view, the "version" field is named the same as the doCheckVersion method:
So that explaons why it works; however in the majority (if not all) the SCM browsers, the url field is named "repoUrl" while the validation method is named doCheckUrl:
I suggest renaming the validation method to doCheckRepoUrl to avoid impacting existing fields!
There you go.
I found 4 other such browsers, which define a method for checking the URL, but it's not fired. However, applying the same chenge does not fix it; maybe others could help.
Those are Assembla, Gitiles, ViewGitWeb and GitBlit.
Fix merged into the master branch. Will be available in git plugin release 3.7.0.
saucistophe could you submit a bug report to remind us that the other 4 browsers you detected (Assembla, Gitiles, ViewGitWeb, and GitBlit) need to have their FormValidation updated? One of the dangers of my not having created an automated test for the FormValidation implementations.
Code changed in jenkins
[FIXED JENKINS-48064] Fisheye Git browser now validates its URL in the configuration.
Pull requests proposing changes (with tests) are welcomed.
I don't have access to a fisheye repository monitoring any of the repositories which I can write.