Configure polling triggers

4 minute readExtensibility

CloudBees CD/RO offer two types of polling triggers:

  • Git-based polling triggers:

    • The Git plugin allows you to configure CloudBees CD/RO to poll a specified Git repository for updates on a preconfigured schedule. The schedule for these triggers can be enabled or disabled using the PollingTriggers scheduler in the Electric Cloud project. Once you configure a trigger, it is active and starts polling for the specified event. If an update is detected, the runtime object runs.

  • Property-based polling triggers:

    • The Trigger property plugin allow you to configure CloudBees CD/RO to poll a specified property within CloudBees CD/RO objects for updates on a preconfigured schedule. The schedule for these triggers can be enabled or disabled using the PropertyPollingTrigger scheduler in the Electric Cloud project. Once you configure a trigger, it is active and starts polling for the specified event. If an update is detected, the runtime object runs.

Before you can use polling triggers, you must enable the appropriate system scheduler and configure a trigger for specific objects. These processes are described in the next sections.

Polling triggers are only supported using the common EC-Git plugin for Git-based polling and the Trigger-Property plugin for CloudBees CD/RO-defined properties. CloudBees CD/RO also offers webhooks that support specific Git providers. For more information on webhooks, refer to Configure webhook triggers.

Enable polling trigger system schedulers

Polling trigger schedules are managed by specific system schedulers located in the Electric Cloud project. To use polling triggers, you must enable the respective polling trigger system scheduler.

In CloudBees CD/RO 10.1, the ECSCM-SentryMonitor scheduler was replaced by the PollingTriggers scheduler. If upgrading from CloudBees CD/RO 10.0 or earlier to 10.1 or later, there is no automatic migration path for Git-based polling. You must enable the PollingTriggers system schedule, remove the old triggers, and manually create new triggers. For more information, refer to Schedule and trigger changes in CloudBees CD/RO 10.1.

To enable a polling trigger system scheduler:

  1. Navigate to DevOps Essentials  Platform Home page.

  2. From the Projects tab, select Electric Cloud.

  3. Select the Schedules tab, and:

    • For Git-based triggers, enable the PollingTriggers procedure.

    • For property-based triggers, enable the PropertyPollingTrigger procedure.

To disable a polling trigger system scheduler, you can follow the same steps and deselect the Check for the scheduler in the Enabled column.

Add polling triggers

You can add a polling trigger from the Triggers page or within CloudBees CD/RO objects. Once the trigger is configured, it polls for the specified event on the assigned schedule.

If you have not done so, you must enable the specific polling trigger scheduler for the desired trigger in the Electric Cloud project before it will run. For more information, refer to Enable polling trigger system schedulers.

To add and configure a polling trigger:

  1. Create the trigger. There are two options:

    • From the CloudBees CD/RO main menu, select DevOps Essentials  Triggers. Select Add trigger at the top right of the screen.

      When using this option, you must supply the details of the object where you want the polling trigger to run, including the project containing the object, the object type and the object name.
    • Within the object where you want to set the trigger, select the (Context menu) button in the upper-right corner, and then select Triggers. The object’s trigger list displays. Select Add + to add a new trigger or select Edit to edit an existing trigger.

      When using this option, CloudBees CD/RO automatically applies the configuration information of the current object.
  2. In the Plugin field, select either:

    • EC-Git:

      Configure the Git plugin for Git-based polling
      Field name Description

      Trigger Name

      User-defined name for this trigger object.

      Plugin

      Select EC-Git.

      In the Plugin field, it is possible to select GitLab, EC-GitHub, and EC-BitBucket, however these selections can only be used to create Webhooks, and not cannot be used for Polling. To implement a polling trigger for a GitHub, GitLab, or Bitbucket-based repository, use the EC-Git plugin.

      Trigger Type

      Select Polling.

      Configuration Name

      Required.

      • Use a pre-configured repository configuration from the Configuration name dropdown list.

      • Create a new configuration. Refer to Create Git plugin configurations.

      Git repository URL

      (Required) A repository URL, for example, git://server/repo.git, https://github.com/github/testrepo.git.

      Monitor

      Specifies what to monitor: Branch or Tags

      Git branch name

      The name of the Git branch to watch for changes, for example, main, dev.

      Run Schedule even if another instance is running

      Select if you want to run a new polling instance if there is already one currently running.

      Quiet Time Minutes

      The number of minutes no check-in-activity is required before launching the procedure.

    • Trigger-Property:

      Configure the Trigger-Property plugin for property polling
      Field name Description

      Trigger Name

      User-defined name for this trigger object.

      Plugin

      Select Trigger-Property.

      Trigger Type

      Select Polling.

      Trigger property name

      Required. Provide the name of an existing property in the object to poll for changes.

      This must be an existing property in the object. If not, error appears in the Result log similar to No such property: Evaluation failed.

      Run trigger on date change

      Select if you want the trigger to run even if the content of the property did not change, but the modification date did.

      Run Schedule even if another instance is running

      Select if you want to run a new polling instance if there is already one currently running.

      Quiet Time Minutes

      The number of minutes no check-in-activity is required before launching the procedure.

  3. Select Next. A summary of run-time details for the object displays.

  4. Select OK.

API access

API resources are available to programmatically create and manage event-based triggers and webhook services. For more information, refer to CloudBees CD/RO APIs.

Delete a trigger

You can delete triggers in the system on the Triggers page.

To delete a trigger:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Triggers.

  2. Select the three vertical dots menu for the trigger you want to delete, and then select Delete. A confirmation dialog box displays.

  3. Select Delete.

To delete multiple triggers:

  1. From the CloudBees CD/RO main menu, select DevOps Essentials  Triggers.

  2. Select the triggers you want to delete, and then select Delete triggers. A confirmation dialog box displays.

  3. Select Delete.