Table of Contents

Class AndoOperations

Namespace
Ando.Operations
Assembly
ando.dll

Core ANDO operations for build configuration, artifacts, and nested builds.

public class AndoOperations
Inheritance
AndoOperations
Inherited Members

Constructors

AndoOperations(StepRegistry, IBuildLogger, Func<string, string>, BuildOptions, ArtifactOperations, ProfileRegistry)

Creates a new AndoOperations instance.

public AndoOperations(StepRegistry registry, IBuildLogger logger, Func<string, string> containerToHostPath, BuildOptions buildOptions, ArtifactOperations artifactOperations, ProfileRegistry profileRegistry)

Parameters

registry StepRegistry

Step registry for registering build steps.

logger IBuildLogger

Logger for output.

containerToHostPath Func<string, string>

Function to translate container paths to host paths.

buildOptions BuildOptions

Build options for configuring the current build.

artifactOperations ArtifactOperations

Artifact operations for copying files to host.

profileRegistry ProfileRegistry

Profile registry for passing profiles to sub-builds.

Methods

Build(DirectoryRef, Action<AndoBuildOptions>?)

Runs a build script in the specified directory or file. The child build runs in a new isolated container with its own .env and context.

public void Build(DirectoryRef directory, Action<AndoBuildOptions>? configure = null)

Parameters

directory DirectoryRef

Directory containing the build.csando file, or a path to a specific .csando file. Examples:

  • Directory("./website") - runs build.csando in ./website
  • Directory("./website") / "deploy.csando" - runs deploy.csando in ./website
configure Action<AndoBuildOptions>

Optional configuration for the child build.

CopyArtifactsToHost(string, string)

Registers files or directories to be copied from the container to the host after the build completes successfully.

public void CopyArtifactsToHost(string containerPath, string hostPath)

Parameters

containerPath string

Path inside the container. Can be relative to /workspace (e.g., "dist", "./artifacts") or absolute (e.g., "/workspace/dist").

hostPath string

Destination path on the host machine. Can be relative to project root (e.g., "./dist") or absolute.

CopyZippedArtifactsToHost(string, string)

Registers files or directories to be archived and copied from the container to the host after the build completes successfully. Creates a single archive file for faster transfer of many small files.

public void CopyZippedArtifactsToHost(string containerPath, string hostPath)

Parameters

containerPath string

Path inside the container. Can be relative to /workspace (e.g., "dist", "./artifacts") or absolute (e.g., "/workspace/dist").

hostPath string

Destination on the host machine. Can be:

  • A directory path (e.g., "./dist") - creates "artifacts.tar.gz" in that directory
  • A .tar.gz file path (e.g., "./dist/output.tar.gz") - creates tar.gz archive
  • A .zip file path (e.g., "./dist/output.zip") - creates zip archive

UseImage(string)

Sets the Docker image for the current build container. Must be called before any build steps execute.

public void UseImage(string image)

Parameters

image string

Docker image name (e.g., "ubuntu:24.04", "mcr.microsoft.com/dotnet/sdk:9.0").