jenkinsci / jenkinsci/git-plugin

[JENKINS-48101] gitBlitRepositoryBrowser doesn't work in jobDSL

Open
#3,231 5 comments 0 reactions 0 assignees View on GitHub
component:git-plugin component:job-dsl-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

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)
}
}
...
 

---
Originally reported by pyrocks, imported from: gitBlitRepositoryBrowser doesn't work in jobDSL


  • status: Open
  • priority: Minor
  • component(s): git-plugin, job-dsl-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 3
  • imported: 2025-12-02

Raw content of original issue

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)
}
}
...
 

environment

```
Jenkins 2.73.3

Job DSL 1.66

Git 3.7.0
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.