Class Trigger

  • All Implemented Interfaces:
    com.ibm.cloud.sdk.core.service.model.ObjectModel
    Direct Known Subclasses:
    TriggerGenericTrigger, TriggerManualTrigger, TriggerScmTrigger, TriggerTimerTrigger

    public class Trigger
    extends com.ibm.cloud.sdk.core.service.model.GenericModel
    Tekton pipeline trigger. Classes which extend this class: - TriggerManualTrigger - TriggerScmTrigger - TriggerTimerTrigger - TriggerGenericTrigger
    • Method Detail

      • getType

        public java.lang.String getType()
        Gets the type. Trigger type.
        Returns:
        the type
      • getName

        public java.lang.String getName()
        Gets the name. Trigger name.
        Returns:
        the name
      • getHref

        public java.lang.String getHref()
        Gets the href. API URL for interacting with the trigger. Only included when fetching the list of pipeline triggers.
        Returns:
        the href
      • getEventListener

        public java.lang.String getEventListener()
        Gets the eventListener. Event listener name. The name of the event listener to which the trigger is associated. The event listeners are defined in the definition repositories of the Tekton pipeline.
        Returns:
        the eventListener
      • getId

        public java.lang.String getId()
        Gets the id. The Trigger ID.
        Returns:
        the id
      • getXProperties

        public java.util.List<TriggerProperty> getXProperties()
        Gets the xProperties. Optional trigger properties used to override or supplement the pipeline properties when triggering a pipeline run.
        Returns:
        the xProperties
      • getTags

        public java.util.List<java.lang.String> getTags()
        Gets the tags. Optional trigger tags array.
        Returns:
        the tags
      • getWorker

        public Worker getWorker()
        Gets the worker. Details of the worker used to run the trigger.
        Returns:
        the worker
      • getMaxConcurrentRuns

        public java.lang.Long getMaxConcurrentRuns()
        Gets the maxConcurrentRuns. Defines the maximum number of concurrent runs for this trigger. If omitted then the concurrency limit is disabled for this trigger.
        Returns:
        the maxConcurrentRuns
      • isEnabled

        public java.lang.Boolean isEnabled()
        Gets the enabled. Flag whether the trigger is enabled.
        Returns:
        the enabled
      • isFavorite

        public java.lang.Boolean isFavorite()
        Gets the favorite. Mark the trigger as a favorite.
        Returns:
        the favorite
      • getSource

        public TriggerSource getSource()
        Gets the source. Source repository for a Git trigger. Only required for Git triggers. The referenced repository URL must match the URL of a repository tool integration in the parent toolchain. Obtain the list of integrations from the toolchain API https://cloud.ibm.com/apidocs/toolchain#list-tools.
        Returns:
        the source
      • getEvents

        public java.util.List<java.lang.String> getEvents()
        Gets the events. Only needed for Git triggers. List of events to which a Git trigger listens. Choose one or more from: 'push', 'pull_request' and 'pull_request_closed'. For SCM repositories that use 'merge request' events, such events map to the equivalent 'pull request' events.
        Returns:
        the events
      • getCron

        public java.lang.String getCron()
        Gets the cron. Only needed for timer triggers. Cron expression that indicates when this trigger will activate. Maximum frequency is every 5 minutes. The string is based on UNIX crontab syntax: minute, hour, day of month, month, day of week. Example: 0 *_/2 * * * - every 2 hours.
        Returns:
        the cron
      • getTimezone

        public java.lang.String getTimezone()
        Gets the timezone. Only used for timer triggers. Specify the timezone used for this timer trigger, which will ensure the cron activates this trigger relative to the specified timezone. If no timezone is specified, the default timezone used is UTC. Valid timezones are those listed in the IANA timezone database, https://www.iana.org/time-zones.
        Returns:
        the timezone
      • getSecret

        public GenericSecret getSecret()
        Gets the secret. Only needed for generic webhook trigger type. Secret used to start generic webhook trigger.
        Returns:
        the secret
      • getWebhookUrl

        public java.lang.String getWebhookUrl()
        Gets the webhookUrl. Webhook URL that can be used to trigger pipeline runs.
        Returns:
        the webhookUrl