[JIRA] (JENKINS-54877) missing elements in job dsl 'organizationFolder'

6 views
Skip to first unread message

domi@fortysix.ch (JIRA)

unread,
Nov 27, 2018, 5:15:02 AM11/27/18
to jenkinsc...@googlegroups.com
Dominik Bartholdi created an issue
 
Jenkins / Improvement JENKINS-54877
missing elements in job dsl 'organizationFolder'
Issue Type: Improvement Improvement
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 2018-11-27 10:14
Environment: Jenkins:2.138.2
job-dsl:1.70
cloudbees-bitbucket-branch-source:2.2.15
basic-branch-build-strategies:1.1.1
Priority: Minor Minor
Reporter: Dominik Bartholdi

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' {}
    }    
}
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

mail@daniel-spilker.com (JIRA)

unread,
Jan 7, 2019, 4:40:03 PM1/7/19
to jenkinsc...@googlegroups.com
Daniel Spilker commented on Improvement JENKINS-54877
 
Re: missing elements in job dsl 'organizationFolder'

The periodic trigger will be fixed as part of JENKINS-55429.

The problem with traits has already been reported as JENKINS-45504.

mail@daniel-spilker.com (JIRA)

unread,
Jun 14, 2019, 6:46:02 AM6/14/19
to jenkinsc...@googlegroups.com
Daniel Spilker started work on Improvement JENKINS-54877
 
Change By: Daniel Spilker
Status: Open In Progress

mail@daniel-spilker.com (JIRA)

unread,
Jun 14, 2019, 6:46:03 AM6/14/19
to jenkinsc...@googlegroups.com

mail@daniel-spilker.com (JIRA)

unread,
Jun 17, 2019, 8:12:02 AM6/17/19
to jenkinsc...@googlegroups.com
Change By: Daniel Spilker
Status: In Progress Fixed but Unreleased
Resolution: Fixed

mail@daniel-spilker.com (JIRA)

unread,
Mar 11, 2020, 9:24:03 AM3/11/20
to jenkinsc...@googlegroups.com
Change By: Daniel Spilker
Status: Fixed but Unreleased Closed
Released As: job-dsl 1.75
This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages