Skip to main content
Version: Release 24.3

Create a Release Trigger

Release triggers are an automated way to create and run a release. When you create a trigger for a release template and enable it, Release will execute the script associated with the trigger at a specified interval. When the trigger starts, it will create and start a new release from the template. A good example of a trigger is one that polls a source code management system like GitHub for a change and starts a release as a result.

Important notes:

  • To create a trigger, you also need the Create Release permission. See template permissions for details.
  • A trigger will not trigger a release during its first run, it will wait until the next iteration.
  • Releases created from a trigger will always be tagged with the Trigger ID and Release ID. Trigger ID

Create a trigger

You can create a trigger from a release Template or from the Triggers tab in a folder.

Create a trigger from a release template

To see the triggers on a template, open a template or a release and select Triggers.

Note that, the Triggers option in the Show menu list from the Release Flow Editor is moved to the left navigation bar when you select a Template.

Template View

Show drop-down Template

  1. Under Settings section, the Allow concurrent triggered releases is enabled by default, and allows releases that are started by the trigger's template to run concurrently instead of sequentially.

    For example, if this option is not selected and a trigger's template detects that multiple releases are set to run at the same time, Release will only run one triggered release at a time.

    Trigger settings

  2. On the top right of the screen, click Add trigger.

  3. Enter a title and select a trigger type.

  4. Continue to Configure trigger details.

Create a trigger from a folder

  1. Open the folder where you want to create the trigger, and navigate to the Triggers tab.
  2. Click Add trigger.
  3. Enter a Title and description.
  4. In the Trigger type field, select a trigger type from the dropdown.
note

By default, the trigger is Enabled.

  1. Continue to Configure trigger details.
  2. In the Use template field, select the release template to use.
note

Once you assign a template to a trigger and save it, you cannot change the associated template.

  1. (Optional) In the Use folder field, you can specify a folder where releases generated by the trigger will be created. If no folder is selected generated releases will be created in current directory.
  2. Save the trigger.

Configure trigger details

The required and optional fields depend on the type of trigger you select. For example, if you select the Git: Poll trigger type, the following page displays:

Trigger form

  1. In the Title field, enter a name that identifies the trigger.

  2. In the Trigger type field, select the Git: Poll type.

  3. In the Poll Type field, select a polling interval. This can be a repeatable interval in seconds - for example, every 10 seconds, or a cron expression.

note

For important information about using cron expressions, see Time zone for cron jobs.

  1. In the Poll Interval field, enter the number of seconds between each execution of the trigger or cron expression.
  2. In the Git Repository field, select the configured Git repository to poll.
  3. In the Use template field, select the template to use when creating a release from the trigger.
  4. In the Release Title field, enter a name for releases that will be created by this trigger. This field can contain variables.
  5. Configure the remaining properties specific to the trigger type.
  6. Optional fields:
    • In the Use Folder field, specify a folder where releases generated by the trigger will be created. If no folder is selected generated releases will be created in the same folder as the trigger.
    • In the Tags field, add tags that will be added to releases created by the trigger. This field can contain variables.
  7. Click Save. Trigger list

You can use the Triggers management page to view and manage all triggers for which you have permissions to view and edit.

About template variables

You can use template variables based on the trigger type and the template. The available variables are shown when you select a template.

For example, the Nexus: Published Artifact trigger includes four specific variables you can use in the Release Title and Tags fields.

Trigger available variables example

By default, all template variables with the same name as a trigger variable are automatically bound. For example, a template variable named commitId will have the value ${commitId}, which will be replaced by the corresponding value of the trigger variable. You can also specify static values or other variables.