All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.goldin.plugins.jenkins.beans.Trigger.groovy Maven / Gradle / Ivy

The newest version!
package com.github.goldin.plugins.jenkins.beans


/**
 * Job trigger
 */
class Trigger
{
    static final Map TYPES = [ scm    : 'hudson.triggers.SCMTrigger',
                               timer  : 'hudson.triggers.TimerTrigger',
                               github : 'com.cloudbees.jenkins.GitHubPushTrigger' ]
    String type
    String description = ''  // Description to be used (by humans) as comment
    String expression  = ''  // Trigger expression

    String getTriggerClass()
    {
        def    triggerClass = TYPES[ this.type ]
        assert triggerClass, "Unknown trigger ${ this.type }. Known types are ${ TYPES.keySet() }"
               triggerClass
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy