Groovy Documentation

javaposse.jobdsl.dsl.helpers
[Groovy] Class TriggerContext

java.lang.Object
  javaposse.jobdsl.dsl.helpers.TriggerContext
All Implemented Interfaces:
Context

class TriggerContext

Property Summary
JobType jobType

java.util.List triggerNodes

java.util.List withXmlActions

 
Constructor Summary
TriggerContext(java.util.List withXmlActions = [], JobType jobType = JobType.Freeform, java.util.List triggerNodes = [])

 
Method Summary
java.lang.Object cron(java.lang.String cronString)

java.lang.Object gerrit(groovy.lang.Closure contextClosure = null)

PLAIN test-project ANT ** false true false

java.lang.Object githubPush()

Trigger that runs jobs on push notifications from Github/Github enterprise

java.lang.Object scm(java.lang.String cronString)

10 * * * *

java.lang.Object snapshotDependencies(boolean checkSnapshotDependencies)

If set to true, Jenkins will parse the POMs of this project, and see if any of its snapshot dependencies are built on this Jenkins as well.

java.lang.Object urlTrigger(groovy.lang.Closure contextClosure)

Adds DSL for adding and configuring the URL trigger plugin to a job.

java.lang.Object urlTrigger(java.lang.String crontab, groovy.lang.Closure contextClosure)

Adds DSL for adding and configuring the URL trigger plugin to a job.

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

jobType

JobType jobType


triggerNodes

java.util.List triggerNodes


withXmlActions

java.util.List withXmlActions


 
Constructor Detail

TriggerContext

TriggerContext(java.util.List withXmlActions = [], JobType jobType = JobType.Freeform, java.util.List triggerNodes = [])


 
Method Detail

cron

java.lang.Object cron(java.lang.String cronString)


gerrit

java.lang.Object gerrit(groovy.lang.Closure contextClosure = null)
PLAIN test-project ANT ** false true false
Parameters:
triggerEvents - Can be ommited and the plugin will user PatchsetCreated and DraftPublished by default. Provide in show name format: ChangeMerged, CommentAdded, DraftPublished, PatchsetCreated, RefUpdated
Returns:


githubPush

java.lang.Object githubPush()
Trigger that runs jobs on push notifications from Github/Github enterprise


scm

java.lang.Object scm(java.lang.String cronString)
10 * * * *


snapshotDependencies

java.lang.Object snapshotDependencies(boolean checkSnapshotDependencies)
If set to true, Jenkins will parse the POMs of this project, and see if any of its snapshot dependencies are built on this Jenkins as well. If so, Jenkins will set up build dependency relationship so that whenever the dependency job is built and a new SNAPSHOT jar is created, Jenkins will schedule a build of this project. Defaults to false.
Parameters:
checkSnapshotDependencies - set to true to check snapshot dependencies


urlTrigger

java.lang.Object urlTrigger(groovy.lang.Closure contextClosure)
Adds DSL for adding and configuring the URL trigger plugin to a job. Uses a default cron execution schedule "H/5 * * * *", every 5 minutes with some jitter to prevent load spikes.
Parameters:
contextClosure - closure for configuring the context


urlTrigger

java.lang.Object urlTrigger(java.lang.String crontab, groovy.lang.Closure contextClosure)
Adds DSL for adding and configuring the URL trigger plugin to a job.
Parameters:
crontab - crontab execution spec
contextClosure - closure for configuring the context


 

Groovy Documentation