Multi-Branch Pipeline triggers interval example?

1,264 views
Skip to first unread message

Greg Smith

unread,
Aug 17, 2016, 4:28:12 PM8/17/16
to Jenkins Users

Hi,

Would someone mind giving me an example of how to use the "properties" task to set a build trigger so that a multibranch pipeline build will run every 15 minutes?

Somehow, both the snippet generator and the pipeline syntax generator are both errorring out on my server, so I can not find any sample of how to do it correctly.

My snippet generator with the value of "H/15 * * * *" just generates the following:
pipelineTriggers([])

And the pipeline syntax generator shows the following:
$class: 'PipelineTriggersJobProperty'
triggers
Array/List:
java.lang.UnsupportedOperationException: do not know how to categorize attributes of type hudson.triggers.Trigger<?>


So with both of those broken, I can't seem to find any good example of how to configure this new capability in my by branch build

Thanks,
Greg



Greg Smith

unread,
Aug 22, 2016, 9:42:54 AM8/22/16
to Jenkins Users

As I hate searching groups for problems, finding exactly my problem, but not finding any answer -- I wanted to follow up on my own post.

I received this example of how to setup the job to build every 15 minutes

properties([pipelineTriggers([cron('H/15 * * * *')])])

When I filed a bug for the snippet generator and documentation not working, in this bug:
https://issues.jenkins-ci.org/browse/JENKINS-37477

Cheers,
Greg



Willy

unread,
Sep 7, 2016, 7:39:47 AM9/7/16
to Jenkins Users
tried this suggested syntax:
properties([pipelineTriggers([cron('H/15 * * * *')])])
 
using plugin="workfl...@2.13" and plugin="workflow-job@2.6"

but it gives me issues on cron:
No such DSL method 'cron' found among steps

just my observation, others could have better luck..
13:22:39 java.lang.NoSuchMethodError: No such DSL method 'cron' found among steps [archive, bat, build, catchError, checkout, checkpoint, deleteDir, dir, dockerFingerprintFrom, dockerFingerprintRun, echo, emailext, emailextrecipients, error, fileExists, findFiles, input, isUnix, jiraComment, jiraIssueSelector, jiraSearch, load, lock, mail, node, parallel, properties, pwd, readFile, readManifest, readMavenPom, readProperties, readTrusted, retry, sh, sleep, sshagent, stage, stash, step, timeout, timestamps, tool, touch, triggerRemoteJob, unarchive, unstash, unzip, waitUntil, withCredentials, withDockerContainer, withDockerRegistry, withDockerServer, withEnv, wrap, writeFile, writeMavenPom, ws, zip] or symbols [disableConcurrentBuilds, pipelineTriggers]
13:22:39 	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:145)
13:22:39 	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:117)
13:22:39 	at groovy.lang.GroovyObject$invokeMethod$3.call(Unknown Source)
13:22:39 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
13:22:39 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)

Reply all
Reply to author
Forward
0 new messages