Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

What is a Trigger?

Triggers in Continua CI are used to automatically queue (a.k.a trigger) the Configuration they belong to when a certain event happens. These "events" are grouped into three categories, or 'trigger' a build based on the current configuration. Builds can be triggered from 3 types of events.

  1. Repository check-in occurs. Specified by the Repository Trigger
  2. A configuration completes. Specified by the Project Completion Build Completed Trigger
  3. It's a certain time of the day/week/month. Specified by the various Time Trigger


Repository Types

Children Display


Creating & Editing Triggers

Each of these trigger types have their own fields and values to be set, the explanation of each field is described in their respective pages of this wiki. Regardless of the trigger type selected, they all share a set of common fields which are described below.

Image Removed

Build Priority

 

Enabled

The trigger isn't operational unless this option is selected.

 

...

Triggers can be created and edited by editing a configuration and navigating to the Triggers section of the Configuration Wizard. Each trigger type has their own properties, however every trigger type share the following properties:

Image Added

Name

The name that will be used to identify this trigger.

Type

This is where you select the trigger type. i.e. Repository trigger, Time trigger or Build Completed trigger.

Enable

If a trigger is disabled then it will not trigger new builds.

Build Priority

This specifies the priority of the build that will be created by this trigger. The Build Priority determines which build to execute next if there are more builds queued than there are available agents. This can be set to either 'high', 'normal' or 'low' with 'high' given the most priority. 

Force repository check

When the trigger is executed and the Configuration a build is queued, the build needs to decided decide what to do with the Repositories attached to the Configuration. In the case of a Repository Trigger, the triggering Repository is assumed to be in a working state since it just triggered the build. However, the same can't be said for all non-triggering repositories of which there could be many. In the case of Time TriggersTrigger and the Project Completion Build Completed Trigger, all repositories are non-triggering repositories. For Repository Trigger, the non-triggering repositories are all those repositories other than the one that triggered the build. When the force repository check option is set, all non-triggering repositories are check checked to see if they 're are in an error state. If they're in an error state, an attempt will be made to fix them. If they're still in an error state then the build won't start and you'll see an entry in the Event Log with the details.

There are times however when you might not care if the repository is in an error state. When you setup a repository in Continua CI, it immediately copies your repository into a repository cache directory located in the Continua Share directory that you setup when installing Continua CI. Continua CI makes sure that the cache is always up to date by polling your repository every now and then (specified when you create a Repositoryrepository). If Continua can't contact your repository then it's marked as errored and as a result the cached version of your repository may not contain the latest changes. By not selecting the force repository check option, you're telling the trigger to not check the repositories (and possibly not get the latest changes from it) and instead use the latest cached version.

 

Type

This is the part where you select the trigger type explained above. (Repository, Time trigger, etc..)

 

Variables

Override repository branch mappings

This will display a new tab for selecting the branch to build for each repository overriding the default repository branch and any repository branch mappings.


Variables

Image Added


The variables drop down will contain a list of all Configuration configuration variables you 've have created. It gives you the ability to change a variable's value when the trigger executes the Configuration. By clicking the plus icon to the right hand side of the input field, you can set the value of any amount of additional variables you like.


Branch Mappings

Image Added


Set the branch to build for each repository. This will override the default branch and any branch mappings.