Versions Compared

Key

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

...

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

...

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 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!"

...

  • Original Values: All Configuration, Project and Application variables can be given a value when creating the variable.
  • Set Configuration Variable values when manually queuing a build: All configuration 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 Variable values when automatically triggering a build: Variable values can be set by Triggers when they automatically queue a build.
  • Set Variable values during the build with the Set Variable Action: The Set Variable Action allows you to change a configuration 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.

...