Class BuildContext
Container for all build state and operations used during script execution. Created by ScriptHost and used throughout the build lifecycle.
public class BuildContext
- Inheritance
-
BuildContext
- Inherited Members
Constructors
BuildContext(string, IBuildLogger)
public BuildContext(string rootPath, IBuildLogger logger)
Parameters
rootPathstringloggerIBuildLogger
Properties
Ando
ANDO operations for nested builds.
public AndoOperations Ando { get; }
Property Value
AppService
Azure App Service deployment operations.
public AppServiceOperations AppService { get; }
Property Value
Artifacts
Artifact operations for copying files to host.
public ArtifactOperations Artifacts { get; }
Property Value
Azure
Azure CLI authentication and account operations.
public AzureOperations Azure { get; }
Property Value
Bicep
Azure Bicep deployment operations.
public BicepOperations Bicep { get; }
Property Value
Cloudflare
Cloudflare operations (Pages deployment, etc.).
public CloudflareOperations Cloudflare { get; }
Property Value
Context
Unified context with Paths and Vars.
public BuildContextObject Context { get; }
Property Value
Dotnet
.NET CLI operations.
public DotnetOperations Dotnet { get; }
Property Value
Ef
Entity Framework operations.
public EfOperations Ef { get; }
Property Value
Executor
Current command executor (local or container).
public ICommandExecutor Executor { get; }
Property Value
Functions
Azure Functions deployment operations.
public FunctionsOperations Functions { get; }
Property Value
Log
Logging operations for build script output.
public LogOperations Log { get; }
Property Value
Logger
Logger for build output.
public IBuildLogger Logger { get; }
Property Value
Node
Node.js installation operations (installs Node.js globally).
public NodeInstallOperations Node { get; }
Property Value
Npm
npm operations.
public NpmOperations Npm { get; }
Property Value
Nuget
NuGet package operations (pack, push).
public NugetOperations Nuget { get; }
Property Value
Operations
Container for all build operations.
public BuildOperations Operations { get; }
Property Value
Options
Build configuration options.
public BuildOptions Options { get; }
Property Value
ProfileRegistry
Registry for build profiles.
public ProfileRegistry ProfileRegistry { get; }
Property Value
StepRegistry
Registry of steps to execute.
public StepRegistry StepRegistry { get; }
Property Value
Methods
CopyArtifactsToHostAsync()
Copies registered artifacts from the container to the host. Called after successful build completion.
public Task CopyArtifactsToHostAsync()
Returns
SetDockerManager(DockerManager, string, string)
Sets the Docker manager, container ID, and host root path for artifact operations. Called by CLI after container is created.
public void SetDockerManager(DockerManager dockerManager, string containerId, string hostRootPath)
Parameters
dockerManagerDockerManagerThe Docker manager instance.
containerIdstringThe container ID for docker exec/cp commands.
hostRootPathstringThe host path where the project is located.
SetExecutor(ICommandExecutor)
Sets the command executor (e.g., when switching to container execution). Called by CLI after script loading when Docker mode is enabled.
public void SetExecutor(ICommandExecutor executor)
Parameters
executorICommandExecutor