Summary
Gets an environment variable that was set by a previous step.
- Namespace
- Cake
.Common .Build .WoodpeckerCI .Commands - Containing Type
- WoodpeckerCICommands
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. |