Вы можете указать коммит, используя настройки ветвления.
// checkout repo1 to a sub directory and clean the workspace after checkout
job('example-1') {
scm {
git {
remote {
name('remoteB')
url('git@server:account/repo1.git')
}
branch('hash')
extensions {
cleanAfterCheckout()
relativeTargetDirectory('repo1')
}
}
}
}