WoodpeckerCICommands.

GetEnvironmentVariable(string) Method

Summary

Gets an environment variable that was set by a previous step.

Syntax

public string GetEnvironmentVariable(string name)

Examples

if (BuildSystem.WoodpeckerCI.IsRunningOnWoodpeckerCI)
{
    var value = WoodpeckerCI.Commands.GetEnvironmentVariable("MY_VAR");
    Information("MY_VAR = {0}", value);
}

Parameters

Name Type Description
name string The environment variable name.

Return Value

Type Description
string The environment variable value, or null if not found.