-
Improvement
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins:2.138.2
job-dsl:1.70
cloudbees-bitbucket-branch-source:2.2.15
basic-branch-build-strategies:1.1.1
-
-
job-dsl 1.75
While configuring our bitbucket organization folder, I came across a couple of places where I needed to use the configure block because it did not work the way I expected:
- 'organizationFolder' / 'triggers' / 'periodic' not working as expected, no matter what value I use, it always falls back to 1 minute
- 'organizationFolder' / 'traits' does not support BranchDiscoveryTrait
- 'organizationFolder' does not support 'buildStrategies'
organizationFolder('org') { description('This contains branch source jobs for Bitbucket') displayName('org') // triggers { // // not working, using configure block below // periodic(28800000) // } organizations { bitbucket { repoOwner('myorg') credentialsId('BITBUCKET_CRED') traits { // BranchDiscoveryTrait not available using configure block below } } } // buildStrategies not available using configure block below // discover Branches (workaround due to JENKINS-46202) configure { node -> // node represents <jenkins.branch.OrganizationFolder> // Behaviours > 'Discover branches' > 'All branches' def traits = node / 'navigators' / 'com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMNavigator' / 'traits' traits << 'com.cloudbees.jenkins.plugins.bitbucket.BranchDiscoveryTrait' { strategyId(3) // detect all branches } // scan all repos at least once a day def triggers = node / 'triggers' triggers << 'com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger' { spec('H H * * *') interval(86400000) } // make sure all branches get build def buildStrategies = node / 'buildStrategies' buildStrategies << 'jenkins.branch.buildstrategies.basic.BranchBuildStrategyImpl' {} } }
- duplicates
-
JENKINS-55429 periodic trigger always results in 1 minute
- Closed
-
JENKINS-45504 Add @Symbol annotations to traits
- Closed
- is duplicated by
-
JENKINS-58314 Job-dsl support for organizationFolder: DslFactory
- Closed