Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46650

Snippet Generator fails with Gitlab repository Version

    Details

    • Type: Bug
    • Status: Fixed but Unreleased (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Jenkins ver. 2.46.3
      Pipeline ver. 2.5
      Git plugin ver. 3.5.1
    • Similar Issues:

      Description

      How to reproduce: In snippet generator choose 'checkout: general SCM', in SCM choose Git, put 'gitlab' in 'repository browser' and a number in a 'Version' field.

      If string is put in 'Version' the error is printed: Can't convert ''8.0'' to a number: For input string: "'8.0'"

      If number is put in 'Version', e.g. 8.0, the following error occurs during pipeline execution:
      java.lang.ClassCastException: hudson.plugins.git.browser.GitLab.version expects class java.lang.String but received class java.math.BigDecimal

        Attachments

          Issue Links

            Activity

            Hide
            owenmehegan Owen Mehegan added a comment - - edited

            Definitely not a gitlab-plugin bug, this is to do with snippets for cloning a repo. I am guessing that git-plugin is what provides the code for the snippet generator to use, but I am not positive; Mark Waite please reassign as you see fit if I've gotten this wrong.

            Kasia Gauza FWIW, I do not think you really need to use the GitLab repository browser function. At least, I have never used that in 5 years of using Jenkins with GitLab. I just treat GitLab like a standard Git repo.

            Show
            owenmehegan Owen Mehegan added a comment - - edited Definitely not a gitlab-plugin bug, this is to do with snippets for cloning a repo. I am guessing that git-plugin is what provides the code for the snippet generator to use, but I am not positive; Mark Waite please reassign as you see fit if I've gotten this wrong. Kasia Gauza FWIW, I do not think you really need to use the GitLab repository browser function. At least, I have never used that in 5 years of using Jenkins with GitLab. I just treat GitLab like a standard Git repo.
            Hide
            nimrod Kasia Gauza added a comment -

            Owen Mehegan, if the options is there, it should be working properly - and my team uses this functionality.

            Show
            nimrod Kasia Gauza added a comment - Owen Mehegan , if the options is there, it should be working properly - and my team uses this functionality.
            Hide
            owenmehegan Owen Mehegan added a comment -

            I didn't say it shouldn't work. You've definitely found a bug. I just don't know what you get from setting the repository browser option, and I seem to have survived without it.

            Show
            owenmehegan Owen Mehegan added a comment - I didn't say it shouldn't work. You've definitely found a bug. I just don't know what you get from setting the repository browser option, and I seem to have survived without it.
            Hide
            markewaite Mark Waite added a comment -

            Fixed in git plugin 4.0.0 pre-release

            Show
            markewaite Mark Waite added a comment - Fixed in git plugin 4.0.0 pre-release

              People

              • Assignee:
                Unassigned
                Reporter:
                nimrod Kasia Gauza
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: