job('job') {
scm {
git {
remote {
url('https://github.com/mygithub/project.git')
credentials('25dwere85ds-dgh6-5874-6954-e226asdasd07e7')
branches('*/my_branch')
configure { project ->
project << 'hudson.plugins.git.GitSCM' {
paramDefs << 'gitTool' {
string('Ubuntu Git')
}
}
}
}
}
}
You need to configure in “job” block not “git” block like :
job(‘job’) {
scm {
git {
…
} //git
} //scm
configure { project ->
project / scm(class: ‘hudson.plugins.git.GitSCM’) {
gitTool ‘Ubuntu Git’
} //project
} //configure
} //job
--
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/d16271ae-207d-41a5-b926-2071a8ab9055%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<gitTool>Default</gitTool>
<scm(class: ‘hudson.plugins.git.GitSCM’)>
<gitTool>Ubuntu Git</gitTool>
</scm(class: ‘hudson.plugins.git.GitSCM’)>
</project>
This one works correctly (put configure block inside git block).
scm {
git {
remote {
..
}
configure { node ->
node / gitTool << 'Ubuntu Git'
}
}
…