[JIRA] (JENKINS-55429) periodic trigger always results in 1 minute

1 view
Skip to first unread message

chris.a.williams@gmail.com (JIRA)

unread,
Jan 7, 2019, 10:43:02 AM1/7/19
to jenkinsc...@googlegroups.com
Chris Williams created an issue
 
Jenkins / Bug JENKINS-55429
periodic trigger always results in 1 minute
Issue Type: Bug Bug
Assignee: Daniel Spilker
Components: job-dsl-plugin
Created: 2019-01-07 15:42
Priority: Major Major
Reporter: Chris Williams

No matter the value passed in to a periodic trigger, it results in a period of 1 minute. (also noted in JENKINS-54877)

I suspect the hard-coded cron spec here is the culprit: https://github.com/jenkinsci/job-dsl-plugin/blob/45052e1545c4c30496cfdda1943a1d7eac998ccc/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/triggers/MultibranchWorkflowTriggerContext.groovy#L20

Note that the trigger class itself actually does some comparison of the values to generate a roughly right cron spec: https://github.com/jenkinsci/cloudbees-folder-plugin/blob/master/src/main/java/com/cloudbees/hudson/plugins/folder/computed/PeriodicFolderTrigger.java

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:05:01 PM1/7/19
to jenkinsc...@googlegroups.com

mail@daniel-spilker.com (JIRA)

unread,
Jan 7, 2019, 4:29:05 PM1/7/19
to jenkinsc...@googlegroups.com
Daniel Spilker commented on Bug JENKINS-55429
 
Re: periodic trigger always results in 1 minute

Ha, good catch!

I will enable Dynamic DSL for computed folder triggers with the next release. Then the following will work:

organizationFolder('example') {
  triggers {
    periodicFolderTrigger {
      interval('5m') // or '2h', '7d', '5000ms', '60s'
    }
  }
}

I will deprecate the existing periodic method in favor of the Dynamic DSL. I do not want to add any logic to Job DSL to compute the cron string nor should a user have to specify both, the cron string and the interval.

mail@daniel-spilker.com (JIRA)

unread,
Jan 9, 2019, 3:24:05 PM1/9/19
to jenkinsc...@googlegroups.com
Change By: Daniel Spilker
Status: Open Fixed but Unreleased
Resolution: Fixed

mail@daniel-spilker.com (JIRA)

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