Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59642

implement organizationChildTriggersProperty

    Details

    • Similar Issues:

      Description

      would be great to configure organizationChildTriggersProperty via CasC, like so maybe?

       

      organizationChildTriggersProperty {
         templates {
           interval('1h')
         }
      }

       

        Attachments

          Issue Links

            Activity

            Hide
            broon_nick Nicholas Brown added a comment -

            I tried the following;

            properties {
                organizationChildTriggersProperty {
                  periodicFolderTrigger {
                    interval('5m')
                  }
                }
              }
            

            and got this error:

            19:54:09 ERROR: (bitbucket.groovy, line 61) No signature of method: periodicFolderTrigger() is applicable for argument types:
            

            When I look at job-DSL api guide in my instance `organizationChildTriggersProperty` is listed, but it has no properties listed underneath it.
            Is there perhaps a missing `@DataBoundConstructor` in the code to expose the triggers?
            https://github.com/jenkinsci/branch-api-plugin/blob/master/src/main/java/jenkins/branch/OrganizationChildTriggersProperty.java#L67

            Show
            broon_nick Nicholas Brown added a comment - I tried the following; properties { organizationChildTriggersProperty { periodicFolderTrigger { interval('5m') } } } and got this error: 19:54:09 ERROR: (bitbucket.groovy, line 61) No signature of method: periodicFolderTrigger() is applicable for argument types: When I look at job-DSL api guide in my instance `organizationChildTriggersProperty` is listed, but it has no properties listed underneath it. Is there perhaps a missing `@DataBoundConstructor` in the code to expose the triggers? https://github.com/jenkinsci/branch-api-plugin/blob/master/src/main/java/jenkins/branch/OrganizationChildTriggersProperty.java#L67
            Hide
            broon_nick Nicholas Brown added a comment -
            Show
            broon_nick Nicholas Brown added a comment - Looks like someone asked something similar here: https://gitter.im/jenkinsci/configuration-as-code-plugin?at=5d434c8c7a151629e107ea94
            Hide
            daspilker Daniel Spilker added a comment -

            The problem is that the @DataBoundConstructor in jenkins.branch.OrganizationChildTriggersProperty uses type parameters which are not supported by Structs plugin (JENKINS-26535).

            As a workaround, the constructor could probably be changed to List<Trigger> templates.

            https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.5.7/src/main/java/jenkins/branch/OrganizationChildTriggersProperty.java#L80

            Show
            daspilker Daniel Spilker added a comment - The problem is that the @DataBoundConstructor in jenkins.branch.OrganizationChildTriggersProperty uses type parameters which are not supported by Structs plugin ( JENKINS-26535 ). As a workaround, the constructor could probably be changed to List<Trigger> templates . https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.5.7/src/main/java/jenkins/branch/OrganizationChildTriggersProperty.java#L80

              People

              • Assignee:
                lifeofguenter Gunter Grodotzki
                Reporter:
                lifeofguenter Gunter Grodotzki
              • Votes:
                3 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated: