SCM Repository Browser has Two options for GitLab

21 views
Skip to first unread message

Sverre Moe

unread,
Apr 25, 2021, 7:21:30 AM4/25/21
to Jenkins Users
There are two options for GitLab when selecting a repository browser in the SCM configuration.

1) GitLab
2) gitlab

The first one does not take any parameters.
The second one takes URL and Version parameters.

What is the difference?
How does the first one get the correct URL to GitLab for the repository URL?

Mark Waite

unread,
Apr 25, 2021, 10:04:46 AM4/25/21
to Jenkins Users
The second one ("gitlab") is provided by the git plugin and retains the version parameter for compatibility with previous releases of the git plugin and very old GitLab servers.  The version parameter was needed many years ago when GitLab changed their URL format.  Users should generally leave it blank.  As far as I can tell from my small tests, it is working as expected.

The first one ("GitLab") is provided by the GitLab branch source plugin and knows that the GitLab installation is modern enough that it does not need to worry about version compatibility.  In my installation, it appears to be broken in at least some of the use cases.  When I configure a freestyle job in Jenkins 2.289, set "GitLab" as the repository browser, and save the job definition, a stack trace is reported to the Jenkins log:

org.apache.commons.jelly.JellyTagException: jar:file:/var/jenkins_home/war/WEB-INF/lib/jenkins-core-2.289.jar!/lib/hudson/listScmBrowsers.jelly:43:77: <st:include> No page found 'config.jelly' for class io.jenkins.plugins.gitlabbranchsource.helpers.GitLabBrowser$DescriptorImpl

Once that stack trace has been generated, the job cannot be edited until I modify the config.xml file of the job to remove the browser definition. I believe the fix is relatively straightforward and I may attempt to submit a pull request to fix it.  I've reported the issue as https://github.com/jenkinsci/gitlab-branch-source-plugin/issues/138

I believe that I had tested it previously and there was a time when it worked, but it is not working for me now with GitLab plugin 1.5.21-SNAPSHOT and gitlab branch source plugin 1.5.7.

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/adceec18-52ec-41a3-b2bd-c77b4701f336n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages