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, in the Show menu in the release flow editor, click Triggers.

  1. Under Settings, 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
  5. Continue to Configure trigger details
  6. 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

  7. 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:

Git:Poll trigger fields

Trigger form

  1. In the Title field, enter a name that identifies the trigger.
  2. In the Release Title field, enter a name for releases that will be created by this trigger. This field can contain variables.
  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.

  4. In the Poll Interval field, enter the number of seconds between each execution of the trigger or cron expression.
  5. Configure the remaining properties specific to the trigger type.
  6. Optionally, 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.