RwxCommands Class

Summary

Provides RWX commands for the current build, allowing tasks to write output values, export environment variables to downstream tasks, and upload artifacts at runtime via the filesystem conventions documented at , , and .
Namespace
Cake.Common.Build.Rwx.Commands
Base Types
  • object
graph BT Type-->Base0["object"] Type["RwxCommands"] class Type type-node

Syntax

public sealed class RwxCommands

Constructors

Name Summary
RwxCommands(ICakeEnvironment, IFileSystem, RwxEnvironmentInfo) Initializes a new instance of the RwxCommands class.

Methods

Name Value Summary
SetEnvironmentVariable(string, string) void
Exports an environment variable for downstream RWX tasks. The value is written to {RWX_ENV}/{name}; each name is a separate file, so repeated calls with the same name overwrite the previous value. The variable becomes visible to tasks that depend on the current one via use. Note that RWX trims a single trailing \n from the file contents when materializing the variable.
SetValue(string, string) void
Sets an RWX output value for the current task. The value is written to {RWX_VALUES}/{key}; each key is a separate file, so repeated calls with the same key overwrite the previous value. Multiline values are written verbatim.
UploadArtifact(FilePath) void
Uploads a file as an RWX artifact for the current task. The file is copied into {RWX_ARTIFACTS}/{filename}, where filename is the leaf name of path.

Extension Methods

Name Value Summary
Dump<RwxCommands>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<RwxCommands>(RwxCommands[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<RwxCommands>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<RwxCommands>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<RwxCommands>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<RwxCommands>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin