这是我使用的(用包裹的bitbucket organizationFolder
):
organizationFolder('example') {
description('This contains branch source jobs for Bitbucket')
displayName('The Organization Folder')
triggers {
periodic(86400)
}
organizations {
bitbucket {
repoOwner('myorg')
credentialsId('BITBUCKET_CRED')
autoRegisterHooks(false)
traits {
sourceRegexFilter {
// A Java regular expression to restrict the project names.
regex('.*')
}
}
}
}
properties {
mavenConfigFolderOverrideProperty {
override(true)
settings {
settingsConfigId('DEFAULT_MAVEN_SETTINGS')
}
}
}
// discover Branches (workaround due to JENKINS-46202)
configure { node ->
// node represents <jenkins.branch.OrganizationFolder>
def traits = node / 'navigators' / 'com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator' / 'traits'
traits << 'com.cloudbees.jenkins.plugins.bitbucket.BranchDiscoveryTrait' {
strategyId(3) // detect all branches
}
}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句