Versions Compared

Key

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

Table of Contents

Variables, Objects & Expressions

Variables and objects are used throughout Continua and they enable dynamic properties and values to be used during your build process. Variables and objects are similar in the way they are called, however they differ in a few key areas which are explained in the following sectionsbelow.

Expressions are the string representation of objects and variables which are used to access their values in various inputs throughout Continua CI.

...

Variables

Variables can be used throughout Continua CI during the build process and can be created at all levels of Continua CI. They are used to pass dynamic values into the build process. Additional information on variables can be found on the Variables page.

...

  • Variables are defined by either the user or pulled from the server's environment variables.
  • A Variable can only ever hold contain 1 value.
  • Variables can be created at the following levels: Build, Configuration, Project , and Application. Variables can also exist at the Environment level however these variables are pulled directly from the server's environment variables.
  • Variables can be accessed by surrounding the variable name with the '%' character. For example, a build variable all variables can be accessed with %myBuildVariableName% while a specific variable can be accessed by provided a namespace prefix. For example, a project variable can be accessed with %Project.myProjectVariableName%.

...

Project variables are created on a specific project and they can only be accessed by configurations and builds that belong to that project. Project variables are read-only at run time and they can be accessed with the %Project.MyVariableName% or %MyVariableName% syntax.

Configuration Variables

Configuration variables are created on a specific configuration and they can only be accessed by builds that belong to that configuration. Configuration variables are read-only at run time and they can be accessed with the %Configuration.MyVariableName% or %MyVariableName% syntax.

Build Variables

Build variables belong to a specific build however they cannot be created manually. They are used to override any of the variables listed above. See Build variables can be updated at runtime - see the next section for more information on how build variables work. Build variables can be accessed with the %MyVariableName% syntax (Note that you cannot use the Build namespace prefix).

Variable Namespace Hierarchy

...

For example, lets say you have 2 variables called myVariable. One of these values is defined on the configuration while the other is defined on the project.

myVariable in the configuration the configuration namespace is assigned the text "my configuration value!"

...

  • %myVariable%"my configuration value!"

In this scenario, when accessing myVariable without a prefix, it will always return the Configuration value instead of the Project as it will return the variable in the lowest namespace it can find.


Overriding Variable Values

...

To demonstrate changing a variable's value, lets use the myVariable example above. So lets say we have configuration variable called myVariable and its value is "my configuration value!"

...

Variable values can be set in a number of ways within Continua CI. (Note that by setting a variables value you are actually creating a build variable with the same name and settings it's setting its value, as explained above):

  • Original Values: All Configuration, Project and Application variables can be given a value when creating the variable.
  • Set Configuration Build Variable values when manually queuing a build: All configuration build variables can have their values changed when you manually start a build. Note that the variable must have a prompt type before they can be overridden when manually queuing a build.
  • Set Build Variable values when automatically triggering a build: Variable Build variable values can be set by Triggers when they automatically queue a build.
  • Set Build Variable values during the build with the Set Variable Action: The Set Variable Action allows you to change a configuration build variable's value during the build process.

...


Objects

Objects are created automatically by Continua and they contain properties that relate to various aspects of Continua. For example, there are Build, Configuration and Project objects which include properties regarding the current build, configuration or project respectively. Additional information and a list of available objects can be found on the Expression Objects page.

Object Definition and how they differ from Variables

...

  • Variables and Object properties: These items contain a single value and do not have any children. They are denoted with the  icon and are the last selectable item in the drop down.
  • Objects: Objects contain a list of properties and child objects which can be accessed by adding the '.' (fullstopfull stop) character to the end of the Object name. Objects are denoted with the  icon. If an object is referenced in an expression without specifying a child property then the object's default property will be used.
  • Variable Namespaces: Namespaces can only be accessed when accessing variables and they are used to access variable values specific to a certain namespace (ie. Configuration, Project, etc.). For example, typing %Project.% will bring up a list of all Project variables. Namespaces are denoted with the  icon.

...

Note that child objects are denoted with the  icon while properties use the  icon.

Image RemovedImage Added

 


As stated above, if you select an object (ie. $Build.$), all the object's properties and sub-objects will be shown in the drop down.

Image RemovedImage Added

Accessing Variables through Expressions

...

Note that namespaces are denoted with the  icon while variables use the  icon.

Image Removed

 Image Added


If you select a namespace then you will only see variables in that namespace.

Image RemovedImage Added

Drop Down Usage and Auto Complete Shortcut keys

...

Once the correct item is selected, pressing enter or tab will enter that value into the input field. Putting a '.' (fullstopfull stop) at the end of the object name will display any children of that object.

...