Versions Compared

Key

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

This feature is available from version 1.8

Continua CI takes a copy of configuration, project and project application variables at the start of each build. These copies are referred to as as Build Variables. Any changes to build variables are normally discarded when the build finishes and cannot be used by other builds.

The new Persist Build Variable build event handler allows you to save the value of build variables when specific events happen in the build timeline. This is stored as the value of the configuration variable. Subsequent builds will then pick up this revised value and use it as the initial value of the build variable.

...

  • On Before Build Queued
  • On Before Build Start
  • On After Build Started
  • On Before Stage Start
  • On Sending Stage To Agent
  • On Stage Completed
  • On Build Pending Promotion
  • On Before Build Continue
  • On After Build Continued
  • On Build Completed
  • On Before Build Stage Requeued

 Some build events will allow you to specify the Stage or Build Status

...

  • On Before Build Queued
  • On Before Build Start
  • On After Build Started
  • On Before Stage Start
  • On Sending Stage To Agent
  • On Stage Completed
  • On Build Pending Promotion
  • On Before Build Continue
  • On After Build Continued
  • On Before Build Stage Requeued

The value of the Configuration, Project or Application variable is stored on this event and this is compared with the current value before persisting. If the value has changed since this event that the new value will not be persisted.

Log warning if not persisted

A warning is added to the build log if this is ticked and the variable value is not persisted due to the modification check.

Fail build if not persisted

The build will fail if this is ticked and the variable value is not persisted due to the modification check.

Update build variable before persisting

A new tab is displayed when this is ticked with options for setting the build variable value before persisting.


Update Value

You can optionally update the value of the build variable before persisting.

Operation

Choose 'Replace' to overwrite the existing variable value, or 'Append or increment' to make changes to existing values. In the later case, the new value is be appended to the old value for text variable. For numeric variable values, the old value will be incremented by the new value.

New Value

Input the new value for the variable.

Expand variable references in new value

If you select this option then any expression is the value will be expanded before the value is set.

...