Interface IVariablesHelper
Provides helper methods for managing workflow variables within the Atom build system.
public interface IVariablesHelper : IBuildAccessor
- Inherited Members
Examples
// Writing variables in a target execution
await WriteVariable("BuildId", "12345");
await WriteVariable("BuildVersion", "1.0.0");
Remarks
This interface enables components to write variables that can be shared across different build steps and targets in the workflow execution context.
Methods
WriteVariable(string, string, CancellationToken)
Writes a variable to the workflow context, making it available for later steps.
Task WriteVariable(string name, string value, CancellationToken cancellationToken = default)
Parameters
namestringThe name of the variable.
valuestringThe value of the variable.
cancellationTokenCancellationTokenA cancellation token.
Returns
- Task
A System.Threading.Tasks.Task representing the asynchronous operation.
Remarks
Variables written through this method are persisted in the current workflow execution context. If a variable with the same name already exists, it will be overwritten.