-
Improvement
-
Resolution: Won't Fix
-
Minor
-
None
Multibranch Pipeline Jobs allow configuring a repository browser (e.g. stash) in their "Branch Sources" section in the GUI.
However, the multibranchPipelineJob/branchSources/git DSL closure does allow a browser method to be called:
multibranchPipelineJob(job.name) {
branchSources {
git {
browser {
stash browseUrl
}
remote job.projectGitUrl
}
}
}
Error message:
Caught: javaposse.jobdsl.dsl.DslScriptException: (script, line 185) No signature of method: javaposse.jobdsl.dsl.helpers.workflow.GitBranchSourceContext.browser() is applicable for argument types: (script$_run_closure3_closure14_closure15_closure19_closure20)
I guess the solution would just be to copy the 'browser' method from GitContext into GitBranchSourceContext...
N.B.: browser already works on pipelineJob.
my workaround for now:
multibranchPipelineJob(job.name) {
...
configure { project ->
(project / 'sources' / 'data' / 'jenkins.branch.BranchSource' / 'source') <<
browser(class: 'hudson.plugins.git.browser.Stash') {
url browseUrl
}
}