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

gitBlitRepositoryBrowser doesn't work in jobDSL

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Hi,

      gitBlitRepositoryBrowser  doesn't work for me - whenever I run the seed job everything is created correctly except for the Git Browser which is set to  "(Auto)".

      It did not work for me in earlier versions of the plugin and jenkins (2.32.1)

      Can you please take a look?

      Thanks.

      This is a snippet from my jobDSL script - values are not real of course:

      ...
      definition {
        cpsScmFlowDefinition {
          scm {
            gitSCM {
              userRemoteConfigs {
                userRemoteConfig {
                  url('https://gitblitserver:8443/r/~username/repo.git')
                  credentialsId('credentials')
                  name('origin')
                  refspec('+refs/heads/master:refs/remotes/origin/master')
                }
              }
              branches {
                branchSpec {
                  name('master')
                }
              }
              //doesn't work...
              browser {
                gitBlitRepositoryBrowser {
                  repoUrl('https://gitblitserver:8443') 
                  projectName('~username/repo.git')
                }
              }
              doGenerateSubmoduleConfigurations(false) //required
              gitTool('') //required
            }
          }
          scriptPath('somescript.groovy')
          lightweight(true)
        }
      }
      ...
       
      

        Attachments

          Issue Links

            Activity

            Hide
            daspilker Daniel Spilker added a comment -

            This is not a Job DSL problem. If I configure the browser manually, the configure page will also show (Auto) after saving and reopening the page.

            Show
            daspilker Daniel Spilker added a comment - This is not a Job DSL problem. If I configure the browser manually, the configure page will also show (Auto) after saving and reopening the page.
            Hide
            markewaite Mark Waite added a comment -

            I suspect the root cause of this problem is the same as the root cause of JENKINS-48625.

            Show
            markewaite Mark Waite added a comment - I suspect the root cause of this problem is the same as the root cause of JENKINS-48625 .
            Hide
            daspilker Daniel Spilker added a comment -

            Mark Waite I don't understand what's the root problem. I tried different browsers, e.g. cgit or gitlab and none is working for me.

            Show
            daspilker Daniel Spilker added a comment - Mark Waite I don't understand what's the root problem. I tried different browsers, e.g. cgit or gitlab and none is working for me.
            Hide
            markewaite Mark Waite added a comment -

            Daniel Spilker I think the root problem is the git plugin is misusing a field named "url" in the abstract class that is used in all the browser implementations. There is a "getUrl()" method that returns a URL instead of a String.

            The symptoms of the error are varied. Several of the browsers have a URL validator implemented, but the validator is never called. This job DSL case looks like another indication of the confusion that exists inside the git plugin browser implementations.

            Show
            markewaite Mark Waite added a comment - Daniel Spilker I think the root problem is the git plugin is misusing a field named "url" in the abstract class that is used in all the browser implementations. There is a "getUrl()" method that returns a URL instead of a String. The symptoms of the error are varied. Several of the browsers have a URL validator implemented, but the validator is never called. This job DSL case looks like another indication of the confusion that exists inside the git plugin browser implementations.

              People

              • Assignee:
                Unassigned
                Reporter:
                pyrocks Mor L
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: